kosiew commented on code in PR #24115:
URL: https://github.com/apache/datafusion/pull/24115#discussion_r3728997620
##########
datafusion/spark/src/function/string/format_string.rs:
##########
@@ -2268,6 +2214,44 @@ impl ConversionSpecifier {
TimeFormat::CLower => Ok(dt.format("%a %b %d %H:%M:%S UTC
%Y").to_string()),
}
}
+
+ fn write_numeric_parts(
Review Comment:
Nice extraction. One thing I'd consider adding is a couple of focused
regression tests around the helper's policy boundaries.
In particular, it would be good to verify that `%0...f` formats `NaN` and
`Infinity` using space padding rather than zero padding, and that a negative
decimal formatted with `(`, `0`, and a width still keeps the closing `)` after
the digits.
The existing tests cover finite zero padding and parenthesized decimals
independently, but these combinations exercise the behavior that
`write_numeric_parts` is now responsible for.
--
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]