jkosh44 opened a new pull request, #14531: URL: https://github.com/apache/datafusion/pull/14531
3dfce7d33c19d6e7941b58cb7e83194c066347ca added an enum to all scalar functions called `NullHandling`, with two variants: `PassThrough` and Propagate`. `PassThrough` would pass through null inputs to the function implementation. `Propagate` would cause the function to return null if any of the inputs were scalar and null, it would not do anything if an input was an array and null. Function implementors were responsible for handling null array inputs and making sure the behavior was consistent with the scalar null behavior caused by `NullHandling`. If the function signature correctly described the accepted types, then the null array input handling would also work for null scalar inputs. However, if the function signature was `VariadicAny`, then the null array input handling would not work for null scalar inputs. The reason is that when the signature is `VariadicAny`, null inputs are not properly typed (for example `ScalarValue::Null` instead of `ScalarValue::Int64(None)`. So it turns out that `NullHandling` was only useful for compensating for non-descriptive function signatures. Furthermore, many array functions use a signature of `VariadicAny` and reject invalid types within the function implementation. This does not work with `NullHandling::Propagate`, because any null input would skip the function implementation, which would skip the type validation. So, if a function wanted to use `NullHandling::Propagate`, then they would need to use a descriptive function signature. However, using a descriptive function signature removes the usefulness of `NullHandling::Propagate`. So as it turns out `NullHandling::Propagate` is never useful. For all the reasons stated above, this commit removes the `NullHandling` enum. ## Which issue does this PR close? Related to #10548 ## Are these changes tested? Yes ## Are there any user-facing changes? No -- 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-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org