kosiew opened a new issue, #16766: URL: https://github.com/apache/datafusion/issues/16766
### Summary The current implementation of `signature()` contains scattered checks and logic for handling `NULL` literals throughout the function. This results in unnecessary complexity and makes the code harder to maintain. Since applying a binary operator between a `NULL` literal and a value of type `T` should consistently resolve to type `T` as the resulting signature, we can simplify the logic by handling `NULL` cases explicitly at the start of the `signature()` function. --- ### Proposed Changes - Introduce an early check at the beginning of `signature()` for `NULL` literals. - If a `NULL` operand is detected, return the signature type based on the non-`NULL` operand. - Skip further `NULL` checks in the rest of the function logic. --- ### Benefits - ✅ Centralized and consistent `NULL` handling - ✅ Cleaner and more maintainable code - ✅ Reduced cognitive load when reviewing or modifying `signature()` - ✅ Aligns with predictable type resolution behavior for `NULL` operations --- ### Impact No functional impact expected aside from code simplification and maintenance improvements. --- ### Context Follow up action from https://github.com/apache/datafusion/pull/16761#pullrequestreview-3014001225 -- 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.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