Skip to content

Conversation

@waynexia
Copy link
Member

Which issue does this PR close?

Closes #6841.

Rationale for this change

Both Expr::Like and Expr::ILike are based on the same struct Like (actually Expr::Similar is also based on it). We can add one marker case_insensitive in struct Like to distinguish them. This can simplify related logic on handling LIKE and ILIKE.

What changes are included in this PR?

Merge Expr::Like and Expr::ILike variants

Are these changes tested?

By existing tests

Are there any user-facing changes?

Yes, this is a breaking change as Expr doesn't have Expr::ILike now.

waynexia added 2 commits July 14, 2023 16:42
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@waynexia waynexia added the api change Changes the API exposed to users of the crate label Jul 18, 2023
@github-actions github-actions bot added sql SQL Planner logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates optimizer Optimizer rules core Core DataFusion crate substrait Changes to the substrait crate labels Jul 18, 2023
Copy link
Member

@jackwener jackwener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup.

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@alamb
Copy link
Contributor

alamb commented Jul 19, 2023

Thank you @waynexia -- I agree with @jackwener that this is a really nice cleanup

@alamb alamb merged commit bb2b39c into apache:main Jul 19, 2023
@waynexia waynexia deleted the merge-like branch July 19, 2023 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api change Changes the API exposed to users of the crate core Core DataFusion crate logical-expr Logical plan and expressions optimizer Optimizer rules physical-expr Changes to the physical-expr crates sql SQL Planner substrait Changes to the substrait crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: combine Expr::Like and Expr::ILike

3 participants