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:
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.
Describe the bug
Native
make_dateuses chronoNaiveDate, which supports years from-262143through262142. Spark accepts wider years when their epoch-day value fitsDateType, so Comet returnsNULLwith ANSI mode disabled or throws with ANSI mode enabled for dates Spark accepts.Steps to reproduce
Run:
Spark returns
+300000-06-15. Native Comet returnsNULLin 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.