You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "peterxcli (via GitHub)" <gi...@apache.org> on 2026/08/02 02:26:48 UTC

[I] Native make_date rejects Spark-valid years outside chrono range [datafusion-comet]

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: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Native make_date rejects Spark-valid years outside chrono range [datafusion-comet]

Posted by "sunchao (via GitHub)" <gi...@apache.org>.
sunchao closed issue #5208: Native make_date rejects Spark-valid years outside chrono range
URL: https://github.com/apache/datafusion-comet/issues/5208


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Native make_date rejects Spark-valid years outside chrono range [datafusion-comet]

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on issue #5208:
URL: https://github.com/apache/datafusion-comet/issues/5208#issuecomment-5155598806

   Thanks @peterxcli for reporting this


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org