peterxcli opened a new issue, #5208: URL: https://github.com/apache/datafusion-comet/issues/5208
## Describe the bug Native `make_date` uses chrono `NaiveDate`, which supports years from `-262143` through `262142`. Spark accepts wider years when their epoch-day value fits `DateType`, so Comet returns `NULL` with ANSI mode disabled or throws with ANSI mode enabled for dates Spark accepts. ## Steps to reproduce Run: ```sql SELECT make_date(300000, 6, 15); ``` Spark returns `+300000-06-15`. Native Comet returns `NULL` in non-ANSI mode and throws in ANSI mode. ## Expected behavior Native Comet should match Spark for dates representable by Spark `DateType`. ## Additional context Found while reviewing #5167. The chrono range limitation predates that pull request; #5167 only fixes ANSI exception fidelity. -- 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]
