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/12/28 21:38:39 UTC

[GitHub] [arrow-datafusion] alamb opened a new issue, #4765: Multiple ways to express `like` / `ilike` / `not like` / `not ilike`

alamb opened a new issue, #4765:
URL: https://github.com/apache/arrow-datafusion/issues/4765

   **Describe the bug**
   There  are two ways to express pattern matching in datafusion Exprs.
   
   ```rust
   Expr::Like(Like)
   ..
   ```
   
   https://github.com/apache/arrow-datafusion/blob/3abbffb5c83395e8e6e68e5529835e72e7769d0d/datafusion/expr/src/operator.rs#L55-L61
   
   As well as
   ```rust
   BinaryExpr {
    left: ..
    op: Operator::Like,
    right: ..
   }
   ```
   
   This causes issues such as the simplification in https://github.com/apache/arrow-datafusion/pull/4646 only affects the BinaryExpr form, not the Expr::Like form
   
   The `Expr::Like` form is more full featured (can have pattern substitution)
   
   
   **Expected behavior**
   I would like to have a single way to represent these operators. I believe it should be `Expr::Like`, `Expr::ILike`, `Expr::NotLike` and `Expr::NotILike` as they have more features. 
   
   Thus, I would like to remove `Operator::Like`, `Operator::ILike`, `Operator::NotLike`, and `Operator::NotILike` and update all tests / code to use Expr::Like
   
   **Additional context**
   Noticed while reviewing  https://github.com/apache/arrow-datafusion/pull/4646  from @crepererum 
   
   I am marking this as "good first issue" as it is mostly a software engineering exercise and would be guided by the compiler -- it would be a good exercise to get familiar with DataFusion's codebase
   


-- 
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.apache.org

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


[GitHub] [arrow-datafusion] alamb closed issue #4765: Multiple ways to express `like` / `ilike` / `not like` / `not ilike`

Posted by GitBox <gi...@apache.org>.
alamb closed issue #4765: Multiple ways to express `like` / `ilike` / `not like` / `not ilike` 
URL: https://github.com/apache/arrow-datafusion/issues/4765


-- 
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] crepererum commented on issue #4765: Multiple ways to express `like` / `ilike` / `not like` / `not ilike`

Posted by GitBox <gi...@apache.org>.
crepererum commented on issue #4765:
URL: https://github.com/apache/arrow-datafusion/issues/4765#issuecomment-1368718641

   Note that the expression variant supports specifying escape characters (as the SQL does) but the binary expression doesn't support options / a third input (its binary after all) and the arrow kernels don't support escape characters at the moment. 


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