Skip to content

Support view matcher with boolean binary operation#117

Merged
xudong963 merged 1 commit into
datafusion-contrib:mainfrom
zhuqi-lucas:support-boolean-operator-view-matcher
Mar 9, 2026
Merged

Support view matcher with boolean binary operation#117
xudong963 merged 1 commit into
datafusion-contrib:mainfrom
zhuqi-lucas:support-boolean-operator-view-matcher

Conversation

@zhuqi-lucas
Copy link
Copy Markdown
Contributor

Support view matcher with boolean binary operation, and added test.

Copilot AI review requested due to automatic review settings March 4, 2026 08:35
@zhuqi-lucas
Copy link
Copy Markdown
Contributor Author

cc @xudong963 @matthewmturner , port our internal feature to upstream.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds canonicalization for boolean column comparisons so semantically equivalent predicates (e.g., col = false vs NOT col) can match during MV rewrites, with new tests validating the behavior.

Changes:

  • Normalize col = true/false and col != true/false into canonical residual expressions (col / NOT col).
  • Add test coverage ensuring MV/query predicate equivalence for boolean expressions (NOT col vs col = false, and col vs col = true).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/rewrite/normal_form.rs
Comment thread src/rewrite/normal_form.rs
@xudong963 xudong963 merged commit 152c885 into datafusion-contrib:main Mar 9, 2026
11 of 12 checks passed
@github-actions github-actions Bot mentioned this pull request Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants