pchintar commented on PR #22697:
URL: https://github.com/apache/datafusion/pull/22697#issuecomment-4763167995

   Hi @Jefffrey I'm v.sorry for this late reply as I was on vacation last week 
actually.
   
   So you had provided me 5 suggestions earlier, I've addressed the 3 cleanup 
suggestions out of those 5:
   
   * replaced the custom integer-type helper with `DataType::is_integer()`
   * restored the original `UInt64` path in the Spark implementation, since 
Spark doesn't expose a `UInt64` type
   * simplified `round_integer_scalar()` to match on `(value, return_type)` 
directly, removing the separate input/output matches while keeping the same 
checked conversions and overflow behavior
   
   For the remaining two points though:
   
   * I kept the shared `i128` intermediate intentionally. It allows all integer 
types to use the same negative-scale rounding logic and then perform a checked 
conversion back to the original type, so overflow is detected consistently 
without duplicating the implementation for every integer width.
   
   * I also kept `ArrowError` in the rounding helpers. The array path goes 
through `calculate_binary_math`, whose callback is defined in terms of 
`ArrowError`, so keeping the same error type there avoids adding a separate 
conversion layer. The scalar path follows the same pattern for consistency.
   
   I hope this reply helps clarify, thnx again!
   


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