opteryx icon indicating copy to clipboard operation
opteryx copied to clipboard

filters not being folded correctly

Open joocer opened this issue 8 months ago • 0 comments

SELECT name FROM $planets WHERE (name LIKE '%u%' OR name LIKE '%a%') AND (mass > 1e-24 OR diameter < 30000)

may be other filters, but noticed this testing the LIKE combining

AFTER OPTIMIZATION
└─ EXIT
   └─ FILTER (PASSTHRU(name RLIKE 'u|a'))
      └─ FILTER (mass > 1e-24 OR diameter < 30000)
         └─ FILTER (PASSTHRU(name RLIKE 'u|a') AND mass > 1e-24 OR diameter < 30000)
            └─ READ ($planets) [name, mass, diameter]

The FILTER closest to the READ is correct, the other two should have been removed.

joocer avatar Mar 19 '25 20:03 joocer