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 2022/08/30 14:35:29 UTC

[GitHub] [arrow-datafusion] andygrove opened a new pull request, #3298: Add top-level `Like`, `ILike`, `SimilarTo` expressions in logical plan

andygrove opened a new pull request, #3298:
URL: https://github.com/apache/arrow-datafusion/pull/3298

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Part of https://github.com/apache/arrow-datafusion/issues/3099
   
    # Rationale for this change
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   This is a subset of https://github.com/apache/arrow-datafusion/pull/3101 which has been open for a few weeks now and depends on other PRs.
   
   This adds new `Like`, `ILike`, and `SimilarTo` expressions to the logical plan but does not plumb it all the way through, so DataFusion SQL query planner continues to use binary expressions with the `Operator::Like` and `Operator::NotLike` for now.
   
   There should be no functional changes with this PR but it allows other query engines (such as Dask SQL) to add support for these expressions with escaped characters.
   
   # What changes are included in this PR?
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   New `Expr` types.
   
   # Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   No
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->


-- 
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] codecov-commenter commented on pull request #3298: Add top-level `Like`, `ILike`, `SimilarTo` expressions in logical plan

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #3298:
URL: https://github.com/apache/arrow-datafusion/pull/3298#issuecomment-1231812591

   # [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/3298?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#3298](https://codecov.io/gh/apache/arrow-datafusion/pull/3298?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1c5d4be) into [master](https://codecov.io/gh/apache/arrow-datafusion/commit/7aed4d697fa24053d515babfd7678855451c6736?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7aed4d6) will **decrease** coverage by `0.30%`.
   > The diff coverage is `32.03%`.
   
   > :exclamation: Current head 1c5d4be differs from pull request most recent head 5b5717a. Consider uploading reports for the commit 5b5717a to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #3298      +/-   ##
   ==========================================
   - Coverage   85.92%   85.62%   -0.31%     
   ==========================================
     Files         294      294              
     Lines       53469    53766     +297     
   ==========================================
   + Hits        45945    46037      +92     
   - Misses       7524     7729     +205     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow-datafusion/pull/3298?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [datafusion/core/src/datasource/listing/helpers.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3298/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9jb3JlL3NyYy9kYXRhc291cmNlL2xpc3RpbmcvaGVscGVycy5ycw==) | `95.01% <ø> (ø)` | |
   | [datafusion/core/src/physical\_plan/planner.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3298/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9jb3JlL3NyYy9waHlzaWNhbF9wbGFuL3BsYW5uZXIucnM=) | `78.75% <0.00%> (-2.13%)` | :arrow_down: |
   | [datafusion/expr/src/expr\_rewriter.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3298/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9leHByL3NyYy9leHByX3Jld3JpdGVyLnJz) | `78.88% <0.00%> (-7.21%)` | :arrow_down: |
   | [datafusion/expr/src/expr\_schema.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3298/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9leHByL3NyYy9leHByX3NjaGVtYS5ycw==) | `67.32% <0.00%> (-2.28%)` | :arrow_down: |
   | [datafusion/expr/src/expr\_visitor.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3298/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9leHByL3NyYy9leHByX3Zpc2l0b3IucnM=) | `57.30% <0.00%> (-6.45%)` | :arrow_down: |
   | [datafusion/expr/src/utils.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3298/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9leHByL3NyYy91dGlscy5ycw==) | `91.10% <ø> (ø)` | |
   | [...tafusion/optimizer/src/common\_subexpr\_eliminate.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3298/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9vcHRpbWl6ZXIvc3JjL2NvbW1vbl9zdWJleHByX2VsaW1pbmF0ZS5ycw==) | `92.15% <0.00%> (-2.15%)` | :arrow_down: |
   | [datafusion/optimizer/src/simplify\_expressions.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3298/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9vcHRpbWl6ZXIvc3JjL3NpbXBsaWZ5X2V4cHJlc3Npb25zLnJz) | `83.79% <0.00%> (-0.27%)` | :arrow_down: |
   | [datafusion/proto/src/from\_proto.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3298/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9wcm90by9zcmMvZnJvbV9wcm90by5ycw==) | `34.63% <0.00%> (-0.89%)` | :arrow_down: |
   | [datafusion/proto/src/to\_proto.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3298/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9wcm90by9zcmMvdG9fcHJvdG8ucnM=) | `50.74% <0.00%> (-2.37%)` | :arrow_down: |
   | ... and [7 more](https://codecov.io/gh/apache/arrow-datafusion/pull/3298/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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] ursabot commented on pull request #3298: Add top-level `Like`, `ILike`, `SimilarTo` expressions in logical plan

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #3298:
URL: https://github.com/apache/arrow-datafusion/pull/3298#issuecomment-1235565555

   Benchmark runs are scheduled for baseline = dadd2dc637eefee923f057b0cff1bd25b8500f47 and contender = a5d6ae470087273740e789f249016cf68f614100. a5d6ae470087273740e789f249016cf68f614100 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/fbb8eeadb1304e32b6a7b277a364339a...a2f7081e7e9a45de8d1473d66799f160/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/bc01f4805df441fa971563472c025970...73f12e467f404b70a6f629a420aab969/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/83afeb27a2484ed0aab0465fd1295131...5a88b968545d4f5183877190177b3938/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/5a77309c31e247f0a295d14ab0c4d16e...8d85cb64c20843ad805413813aa9eefd/)
   Buildkite builds:
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
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] andygrove commented on a diff in pull request #3298: Add top-level `Like`, `ILike`, `SimilarTo` expressions in logical plan

Posted by GitBox <gi...@apache.org>.
andygrove commented on code in PR #3298:
URL: https://github.com/apache/arrow-datafusion/pull/3298#discussion_r958650037


##########
datafusion/expr/src/expr.rs:
##########
@@ -100,6 +100,27 @@ pub enum Expr {
         /// Right-hand side of the expression
         right: Box<Expr>,
     },
+    /// LIKE expression
+    Like {
+        negated: bool,
+        expr: Box<Expr>,
+        pattern: Box<Expr>,

Review Comment:
   Typically this would be a `Expr::Literal`, but it can be any expression that evaluates to a string. It could be another column for example.



-- 
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] andygrove merged pull request #3298: Add top-level `Like`, `ILike`, `SimilarTo` expressions in logical plan

Posted by GitBox <gi...@apache.org>.
andygrove merged PR #3298:
URL: https://github.com/apache/arrow-datafusion/pull/3298


-- 
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] jdye64 commented on a diff in pull request #3298: Add top-level `Like`, `ILike`, `SimilarTo` expressions in logical plan

Posted by GitBox <gi...@apache.org>.
jdye64 commented on code in PR #3298:
URL: https://github.com/apache/arrow-datafusion/pull/3298#discussion_r958584662


##########
datafusion/expr/src/expr.rs:
##########
@@ -100,6 +100,27 @@ pub enum Expr {
         /// Right-hand side of the expression
         right: Box<Expr>,
     },
+    /// LIKE expression
+    Like {
+        negated: bool,
+        expr: Box<Expr>,
+        pattern: Box<Expr>,

Review Comment:
   Curious, would `Expr` map to a `Expr::ScalarValue` for a pattern, aka would the user expect a scalar value, or would it map to some sort of function? Just curious what to expect here when using this.



-- 
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] andygrove commented on pull request #3298: Add top-level `Like`, `ILike`, `SimilarTo` expressions in logical plan

Posted by GitBox <gi...@apache.org>.
andygrove commented on PR #3298:
URL: https://github.com/apache/arrow-datafusion/pull/3298#issuecomment-1231759201

   @alamb @tustvold @jdye64 PTAL when you can. Ideally, I would like to get this merged by Friday before cutting the 12.0.0 RC.


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