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

   ## Summary
   - Adds Spark 4.0+'s `dayname(date)`: the three-letter abbreviated English 
day name, `Mon` to `Sun`. Ported from the dayname half of DataFusion Comet's 
`datetime_funcs/day_month_name.rs`; the monthname half already exists here.
   - Built the same way as the existing `monthname` (same coercion from 
timestamp to date, same nullability), using Arrow's `DayOfWeekMonday0` date 
part instead of a manual weekday calculation.
   - NULL gives NULL; the result is `Utf8`.
   
   ## Testing
   - `datetime/dayname.slt`. Spark's own test suite has no `dayname` golden 
file, so the expected values are the example in Spark's docs 
(`dayname(DATE('2008-02-20'))` is `Wed`) plus calendar facts (2024-01-01 is a 
Monday, 1970-01-01 a Thursday).
   - `cargo clippy --all-targets --all-features -- -D warnings`, `cargo test -p 
datafusion-spark` and `cargo test -p datafusion-spark-sqllogictest` pass.
   
   ## Note
   Timestamp inputs go through the same timestamp-to-date coercion as 
`monthname`, so they share its time zone behavior.


-- 
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