Skip to content
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

✨ Redundant Boolean Conditions #1718

Open
joocer opened this issue Jun 1, 2024 · 0 comments
Open

✨ Redundant Boolean Conditions #1718

joocer opened this issue Jun 1, 2024 · 0 comments
Labels
⚙️ Query Optimizer Component Label - Optimizer

Comments

@joocer
Copy link
Contributor

joocer commented Jun 1, 2024

AFTER COST OPTIMIZATION
└─ EXIT
   └─ FILTER (True OR name = 'Saturn')
      └─ READ ($planets) [name]

We can apply these rules:

TRUE OR X => TRUE
FALSE OR X => X
TRUE AND X => X
FALSE AND X => FALSE
TRUE XOR X => NOT(X)
FALSE XOR X => X

This should be part of the Constant Folding strategy rather than the Boolean Simplification strategy

@joocer joocer added the ⚙️ Query Optimizer Component Label - Optimizer label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ Query Optimizer Component Label - Optimizer
Projects
None yet
Development

No branches or pull requests

1 participant