You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "comphead (via GitHub)" <gi...@apache.org> on 2023/06/16 16:18:28 UTC

[GitHub] [arrow-datafusion] comphead commented on a diff in pull request #6698: fix: parser for negative intervals

comphead commented on code in PR #6698:
URL: https://github.com/apache/arrow-datafusion/pull/6698#discussion_r1232456547


##########
datafusion/sql/src/expr/value.rs:
##########
@@ -199,7 +200,13 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
         let value = match value {
             SQLExpr::Value(
                 Value::SingleQuotedString(s) | Value::DoubleQuotedString(s),
-            ) => s,
+            ) => {
+                if negative {
+                    "-".to_owned() + &s

Review Comment:
   ```suggestion
                      format!("-{s}")
   ```



-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org