Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.39.0
Description
The following query
SELECT * FROM T WHERE p0 UNION SELECT * FROM T WHERE p1
can be rewritten as
SELECT * FROM T WHERE p0 OR p1
This works if the the left and right filtered inputs are the same collection.
This should work even when p0 and p1 return 'true' for the same rows, because UNION eliminates the duplicates.
A similar rule should work for INTERSECT using AND