soupam05 opened a new pull request, #10026: URL: https://github.com/apache/incubator-gluten/pull/10026
- Implement SparkFunctionDateFromUnixDate in C++ - Register function in CommonScalarFunctionParser - Add unit test in GlutenDateFunctionsSuite (Spark 3.5) for correctness This enables Spark SQL queries using date_from_unix_date to work with the ClickHouse backend. ## What changes were proposed in this pull request? This pull request adds support for the date_from_unix_date function in the ClickHouse backend of Apache Gluten. Specifically, it includes: Implementation of the SparkFunctionDateFromUnixDate C++ function, which converts a unix date (number of days since epoch) to a Spark-compatible date. Registration of the function in the ClickHouse function factory and the scalar function parser, enabling Substrait-to-ClickHouse translation. Addition of unit tests in GlutenDateFunctionsSuite (Spark 3.5) to verify correctness and expected behavior. ## How was this patch tested? Added unit tests in gluten-ut/spark35/src/test/scala/org/apache/spark/sql/GlutenDateFunctionsSuite.scala to cover: Typical values (e.g., date_from_unix_date(0) returns 1970-01-01) Larger values (e.g., date_from_unix_date(1000) returns 1972-09-27) Null handling (date_from_unix_date(null) returns null) Ran the full test suite to ensure no regressions. No UI changes are involved in this patch. -- 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]
