You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/08/23 20:20:10 UTC

[GitHub] [arrow-datafusion] alamb opened a new pull request #934: Update to sqlparser v 0.10.0

alamb opened a new pull request #934:
URL: https://github.com/apache/arrow-datafusion/pull/934


   # Which issue does this PR close?
   related to https://github.com/apache/arrow-datafusion/issues/795
   
   
    # Rationale for this change
    Get SQL support for regular expression matching added by @b41sh in https://github.com/ballista-compute/sqlparser-rs/pull/328, thus unblocking https://github.com/apache/arrow-datafusion/pull/870.
   
   
   # What changes are included in this PR?
   Changes:
   1. Update dependency to sqlparser v 0.10.0
   2. Update datafusion code for new version
   3. Rename `Operator::Modulus` to `Operator::Modulo` to match change in SQL in https://github.com/sqlparser-rs/sqlparser-rs/pull/335
   
   
   # Are there any user-facing changes?
   `Operator::Modulus` --> `Operator::Modulo`
   


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



[GitHub] [arrow-datafusion] houqp commented on a change in pull request #934: Update to sqlparser v 0.10.0

Posted by GitBox <gi...@apache.org>.
houqp commented on a change in pull request #934:
URL: https://github.com/apache/arrow-datafusion/pull/934#discussion_r694412796



##########
File path: datafusion/Cargo.toml
##########
@@ -51,7 +51,7 @@ ahash = "0.7"
 hashbrown = { version = "0.11", features = ["raw"] }
 arrow = { version = "^5.2", features = ["prettyprint"] }
 parquet = { version = "^5.2", features = ["arrow"] }
-sqlparser = "0.9.0"
+sqlparser = "0.10.0"

Review comment:
       given that datafusion is used as a library, perhaps there is value in pinning the version with less restrictions say `0.10`, so downstream consumers can update the patch version if needed without running into version confilcts.




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



[GitHub] [arrow-datafusion] Dandandan commented on a change in pull request #934: Update to sqlparser v 0.10.0

Posted by GitBox <gi...@apache.org>.
Dandandan commented on a change in pull request #934:
URL: https://github.com/apache/arrow-datafusion/pull/934#discussion_r694704878



##########
File path: datafusion/Cargo.toml
##########
@@ -51,7 +51,7 @@ ahash = "0.7"
 hashbrown = { version = "0.11", features = ["raw"] }
 arrow = { version = "^5.2", features = ["prettyprint"] }
 parquet = { version = "^5.2", features = ["arrow"] }
-sqlparser = "0.9.0"
+sqlparser = "0.10.0"

Review comment:
       FWIW, I believe cargos solver / version scheme already allows this for `=` and `^=` (which are the same), regardless of the last `.0` included




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



[GitHub] [arrow-datafusion] alamb commented on pull request #934: Update to sqlparser v 0.10.0

Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #934:
URL: https://github.com/apache/arrow-datafusion/pull/934#issuecomment-904628715


   FYI @b41sh 


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



[GitHub] [arrow-datafusion] seddonm1 commented on a change in pull request #934: Update to sqlparser v 0.10.0

Posted by GitBox <gi...@apache.org>.
seddonm1 commented on a change in pull request #934:
URL: https://github.com/apache/arrow-datafusion/pull/934#discussion_r694303295



##########
File path: datafusion/src/sql/planner.rs
##########
@@ -1256,7 +1256,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
                     BinaryOperator::Minus => Ok(Operator::Minus),
                     BinaryOperator::Multiply => Ok(Operator::Multiply),
                     BinaryOperator::Divide => Ok(Operator::Divide),
-                    BinaryOperator::Modulus => Ok(Operator::Modulus),
+                    BinaryOperator::Modulo => Ok(Operator::Modulo),

Review comment:
       Seems to me like it is worth fixing everywhere consistently




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



[GitHub] [arrow-datafusion] alamb commented on a change in pull request #934: Update to sqlparser v 0.10.0

Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #934:
URL: https://github.com/apache/arrow-datafusion/pull/934#discussion_r694292397



##########
File path: datafusion/src/sql/planner.rs
##########
@@ -1274,6 +1274,24 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
                 })
             }
 
+            SQLExpr::Trim { expr, trim_where } => {
+                let fun = match trim_where {
+                    Some((trim_where, _expr)) => {

Review comment:
       Filed https://github.com/apache/arrow-datafusion/issues/935 to track supporting this extended syntax




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



[GitHub] [arrow-datafusion] alamb commented on a change in pull request #934: Update to sqlparser v 0.10.0

Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #934:
URL: https://github.com/apache/arrow-datafusion/pull/934#discussion_r694281512



##########
File path: datafusion/src/sql/planner.rs
##########
@@ -1256,7 +1256,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
                     BinaryOperator::Minus => Ok(Operator::Minus),
                     BinaryOperator::Multiply => Ok(Operator::Multiply),
                     BinaryOperator::Divide => Ok(Operator::Divide),
-                    BinaryOperator::Modulus => Ok(Operator::Modulus),
+                    BinaryOperator::Modulo => Ok(Operator::Modulo),

Review comment:
       `sqlparser` renamed this to Modulo as that is a more correct name for the remainder function. I did the same for DataFusion, though we can leave `Operator::Modulus` if that is desired




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



[GitHub] [arrow-datafusion] alamb commented on a change in pull request #934: Update to sqlparser v 0.10.0

Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #934:
URL: https://github.com/apache/arrow-datafusion/pull/934#discussion_r694699377



##########
File path: datafusion/Cargo.toml
##########
@@ -51,7 +51,7 @@ ahash = "0.7"
 hashbrown = { version = "0.11", features = ["raw"] }
 arrow = { version = "^5.2", features = ["prettyprint"] }
 parquet = { version = "^5.2", features = ["arrow"] }
-sqlparser = "0.9.0"
+sqlparser = "0.10.0"

Review comment:
       ```suggestion
   sqlparser = "0.10"
   ```




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



[GitHub] [arrow-datafusion] alamb merged pull request #934: Update to sqlparser v 0.10.0

Posted by GitBox <gi...@apache.org>.
alamb merged pull request #934:
URL: https://github.com/apache/arrow-datafusion/pull/934


   


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