andygrove opened a new issue, #4451: URL: https://github.com/apache/datafusion-comet/issues/4451
## Describe the bug `make_date(year, month, day)` returns `NULL` for an invalid `(year, month, day)` triple even when `spark.sql.ansi.enabled=true`, where Spark throws via `QueryExecutionErrors.ansiDateTimeError` (3.4/3.5) / `ansiDateTimeArgumentOutOfRange` (4.0). The native impl `SparkMakeDate` in `native/spark-expr/src/datetime_funcs/make_date.rs` always returns NULL and never raises. ## Steps to reproduce ```sql SET spark.sql.ansi.enabled=true; SELECT make_date(2024, 2, 30); -- Spark: throws ansiDateTimeArgumentOutOfRange / ansiDateTimeError -- Comet: NULL ``` ## Expected behavior Match Spark: throw under ANSI; return NULL otherwise. ## Additional context Surfaced by the date/time audit (#4448). Reproducer captured as an ignored test in `spark/src/test/resources/sql-tests/expressions/datetime/make_date.sql`; remove the `ignore(...)` when this is fixed. -- 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]
