You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2026/01/29 22:04:12 UTC

[I] Native engine panics on all-scalar inputs for hour, minute, second, unix_timestamp [datafusion-comet]

andygrove opened a new issue, #3336:
URL: https://github.com/apache/datafusion-comet/issues/3336

   ## Description
   
   When Spark's `ConstantFolding` optimizer rule is disabled, all-scalar (literal-only) expressions reach Comet's native engine instead of being folded at plan time. The native engine panics with messages like:
   
   - `hour(scalar) should be fold in Spark JVM side.`
   - `minute(scalar) should be fold in Spark JVM side.`
   - `second(scalar) should be fold in Spark JVM side.`
   - `unix_timestamp(scalar) should be fold in Spark JVM side.`
   
   ## How to Reproduce
   
   Disable constant folding and run an all-literal datetime extraction query:
   
   ```sql
   SET spark.sql.optimizer.excludedRules=org.apache.spark.sql.catalyst.optimizer.ConstantFolding;
   SELECT hour(timestamp('2024-01-15 12:30:45'));
   ```
   
   ## Expected Behavior
   
   The native engine should handle scalar inputs gracefully — either by computing the correct result or by falling back to Spark, not by panicking.
   
   ## Affected Expressions
   
   - `hour()`
   - `minute()`
   - `second()`
   - `unix_timestamp()`


-- 
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 engine panics on all-scalar inputs for hour, minute, second, unix_timestamp [datafusion-comet]

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

   take


-- 
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