Skip to content

feat: Simplify NOT(IN ..) to NOT IN and NOT (EXISTS ..) to NOT EXISTS - #17848

Merged
xudong963 merged 3 commits into
apache:mainfrom
Tpt:not-exists
Oct 2, 2025
Merged

feat: Simplify NOT(IN ..) to NOT IN and NOT (EXISTS ..) to NOT EXISTS#17848
xudong963 merged 3 commits into
apache:mainfrom
Tpt:not-exists

Conversation

@Tpt

@TptTpt commented Sep 30, 2025

Copy link
Copy Markdown
Contributor

Makes sure NOT X in Y gets rewritten into X NOT IN Y and similarly for EXISTS

@github-actionsgithub-actionsBot added logical-expr Logical plan and expressions optimizer Optimizer rules labels Sep 30, 2025
@alambalamb changed the title feat: makes Expr::not normalize more negationsfeat: Simplify Expr::not moreOct 1, 2025
@alambalamb changed the title feat: Simplify Expr::not morefeat: Simplify NOT(IN ..) to NOT IN and NOT (EXISTS ..) to NOT EXISTS`Oct 1, 2025
@alambalamb changed the title feat: Simplify NOT(IN ..) to NOT IN and NOT (EXISTS ..) to NOT EXISTS`feat: Simplify NOT(IN ..) to NOT IN and NOT (EXISTS ..) to NOT EXISTSOct 1, 2025

@alambalamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @Tpt -- this looks like a nice improvement to me

@alambalamb added the performance Make DataFusion faster label Oct 1, 2025
@alamb

alamb commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

🤔 the CI failures look unrelated to this PR:

And it looks like it was fixed in #17855

I'll merge this branch up and hopefully we'll get a clean run

@xudong963
xudong963 added this pull request to the merge queueOct 2, 2025
Merged via the queue into apache:main with commit b81073aOct 2, 2025
28 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

logical-exprLogical plan and expressionsoptimizerOptimizer rulesperformanceMake DataFusion faster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Tpt@alamb@xudong963