kosiew opened a new pull request, #16768:
URL: https://github.com/apache/datafusion/pull/16768

   ## Which issue does this PR close?
   
   - Closes #16766.
   
   ## Rationale for this change
   
   This change refactors the `BinaryTypeCoercer` to handle `NULL` coercion at 
the beginning of the `signature` method. By doing so, it removes redundant 
`NULL` coercion checks from the arithmetic operation logic, making the code 
easier to follow and maintain.
   
   The refactor ensures that `NULL` is handled consistently across different 
operator categories while improving readability and reducing duplication of 
coercion logic.
   
   ## What changes are included in this PR?
   
   - Added early return in `signature` method for `NULL` coercion cases.
   - Introduced `signature_inner` helper method to handle the remaining 
signature logic after coercion.
   - Removed redundant `NULL` coercion checks in arithmetic operations.
   - Refactored all coercion checks in operator cases to use the new 
`signature_inner` helper.
   - Simplified the arithmetic coercion block by relying on the unified early 
`NULL` coercion.
   
   ## Are these changes tested?
   
   - ✅ Existing tests covering `BinaryTypeCoercer` are expected to cover these 
changes.
   - ✅ The change is a refactor with logic unchanged except for removal of 
redundancy.
   - ✅ If needed, further tests will be added after feedback.
   
   ## Are there any user-facing changes?
   
   - No user-facing changes.
   - The change is internal refactoring with no impact on external API or 
behavior.
   


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

Reply via email to