yaooqinn opened a new pull request, #11549: URL: https://github.com/apache/incubator-gluten/pull/11549
### What changes were proposed in this pull request? Port Spark's `dayname` function ([SPARK-46725](https://issues.apache.org/jira/browse/SPARK-46725)) to Gluten for Spark 4.0 and 4.1. The `dayname` function returns the three-letter abbreviated day name (Mon, Tue, Wed, Thu, Fri, Sat, Sun) from a date or timestamp. This function was introduced in Spark 4.0.0. ### Changes: 1. **ExpressionNames.scala**: Added `DAY_NAME` constant (`dayname`) 2. **Spark40Shims.scala / Spark41Shims.scala**: Register `DayName` expression mapping 3. **ExpressionConverter.scala**: Modified `GetDateField` handling to allow `DayName` to use `GenericExpressionTransformer` (since it returns String, not integer like other extract functions) 4. **Tests**: Added `dayname` tests in `date.sql` for both Spark 4.0 and 4.1 ### How was this patch tested? - Added SQL tests in `date.sql` input/output files for Spark 4.0 and 4.1 - Enabled `date.sql` in `VeloxSQLQueryTestSettings` for both versions ### Note This is a WIP PR. Velox already supports the `dayname` function in `RegisterDatetime.cpp`. -- 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]
