-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add top-level Like
, ILike
, SimilarTo
expressions in logical plan
#3298
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3298 +/- ##
==========================================
- Coverage 85.75% 85.42% -0.33%
==========================================
Files 294 294
Lines 53749 53955 +206
==========================================
Hits 46091 46091
- Misses 7658 7864 +206
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me. Had a question about anticipated Expr
type I couldn't quite derive from the rest of the PR.
Note I didn't really look at the physical planner piece as I am not as familiar with those bits.
Like { | ||
negated: bool, | ||
expr: Box<Expr>, | ||
pattern: Box<Expr>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Benchmark runs are scheduled for baseline = dadd2dc and contender = a5d6ae4. a5d6ae4 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Which issue does this PR close?
Part of #3099
Rationale for this change
This is a subset of #3101 which has been open for a few weeks now and depends on other PRs.
This adds new
Like
,ILike
, andSimilarTo
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 theOperator::Like
andOperator::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?
New
Expr
types.Are there any user-facing changes?
No