opteryx icon indicating copy to clipboard operation
opteryx copied to clipboard

✨ Redundant Boolean Conditions

Open joocer opened this issue 1 year ago • 0 comments

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 avatar Jun 01 '24 15:06 joocer