andygrove opened a new pull request, #3201:
URL: https://github.com/apache/datafusion-comet/pull/3201

   ## Summary
   - Adds native Comet support for Spark's `date_format` function
   - Uses DataFusion's `to_char` function for the underlying implementation
   - Supports a whitelist of common format strings that can be reliably mapped 
between Spark SimpleDateFormat patterns and strftime patterns
   
   Supported formats include:
   - Date formats: `yyyy-MM-dd`, `yyyy/MM/dd`, `yyyyMMdd`, `yyyyMM`
   - Time formats: `HH:mm:ss`, `HH:mm`, `HH`, `mm`, `ss`
   - DateTime formats: `yyyy-MM-dd HH:mm:ss`, `yyyy/MM/dd HH:mm:ss`
   - Day/month names: `EEEE`, `EEE`, `MMMM`, `MMM`
   - 12-hour time: `hh:mm:ss a`, `hh:mm a`, `h:mm a`
   - ISO format: `yyyy-MM-dd'T'HH:mm:ss`
   - Single components: `yyyy`, `yy`, `MM`, `dd`
   
   Unsupported format strings will fall back to Spark execution.
   
   ## Test Plan
   - Added comprehensive tests in `CometTemporalExpressionSuite`:
     - Tests all supported format strings with timestamp columns
     - Tests with literal timestamps (constant folding disabled)
     - Tests null handling
     - Tests fallback to Spark for unsupported formats
   
   > **Note:** This PR was generated with AI assistance.
   
   Closes #3088


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to