Vyrham opened a new pull request, #460:
URL: https://github.com/apache/datafusion-spark/pull/460

   Closes #267.
   
   Implements Spark-compatible `conv(num, from_base, to_base)`, a faithful port 
of Spark 4.2.0's `NumberConverter`: parse into `u64` stopping at the first 
invalid digit, only `-` is a sign, positive `to_base` prints unsigned, negative 
prints signed. Overflow saturates to `-1` with ANSI off and raises Spark's 
`ARITHMETIC_OVERFLOW` error with ANSI on (mode from the session setting). 
Includes Rust unit tests and sqllogictest coverage (`math/conv.slt`) with the 
issue's examples, and updates the function docs.
   
   Notes for reviewers:
   - The docs in `docs/functions/` were updated by hand following the docgen 
format; please let me know if `dev/update_function_docs.sh` produces anything 
different and I will align them.
   - Open questions: the `ARITHMETIC_OVERFLOW` message text is Spark's 
`overflowInConvError`; is the plain message acceptable, or does Spark 4.2 
attach query context in some paths? `i32::MIN` as `to_base` is treated as 
out-of-range (NULL), matching Java's `Math.abs(Integer.MIN_VALUE)` staying 
negative.
   


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