kumarUjjawal commented on issue #19155:
URL: https://github.com/apache/datafusion/issues/19155#issuecomment-3694002373

   Spark's Behavior
   
   From `intervalExpressions.scala#L392`:
   
   ```scala
   override def nullable: Boolean = if (failOnError) 
children.exists(_.nullable) else true
   ```
   
   * `failOnError = true` (ANSI mode): nullable only if any child is nullable
   * `failOnError = false` (default): always nullable (overflow returns NULL)
   
   ### Current Limitation
   
   * DataFusion has ANSI mode config: `datafusion.execution.enable_ansi_mode`
   * However, `ReturnFieldArgs` (used by `return_field_from_args` at planning 
time) doesn't have access to `ConfigOptions`
   * Only `ScalarFunctionArgs` (at execution time) has config access
   
   ### What's Needed
   
   1. Add `ConfigOptions` to `ReturnFieldArgs` in `datafusion-expr` crate, OR
   2. Find another way to access config during logical planning
   
   ### Current Behavior
   
   Without ANSI mode support, `make_interval` defaults to always nullable 
(matching Spark's `failOnError=false`), which is already the default behavior 
no code change needed.


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

Reply via email to