nuno-faria commented on code in PR #24046:
URL: https://github.com/apache/datafusion/pull/24046#discussion_r3715303968
##########
datafusion/sql/src/expr/value.rs:
##########
@@ -74,10 +73,22 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
unsigned_number: &str,
negative: bool,
) -> Result<Expr> {
- let signed_number: Cow<str> = if negative {
- Cow::Owned(format!("-{unsigned_number}"))
+ let mut signed_number =
Review Comment:
Thanks, I changed it. It does require an extra iteration when the string has
underscores (with `contains`), but I profiled the code and the cost is minimal
vs the improvement on positive numbers without underscores.
--
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]