Filter push down is incorrect for fallible operations #5728
Unanswered
gatesn
asked this question in
Issue Triage
Replies: 1 comment
-
|
That's definitely a problem in the old world... But in the new world we should be able to get around this in the first optimization pass? Or at least in the set of "transformations that are always good to apply" rules. Note that I think the correct way to do this would be to match on the entire expression (including the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
Both in the current world, and in the upcoming logical plan world, we tend to assume that filters can be arbitrarily re-ordered.
But there is an annoying case,
SELECT cast(a, u8) WHERE a < 256)We must construct the projection as
cast(filter(a), u8), otherwise a failure to cast would fail the entire query. The logic on develop switches the order of these operations based on the selectivity of the filter mask.Solutions:
Expected Behavior
We must apply the filter mask before the projection expression in the FlatLayoutReader
Actual Behavior
The order of operations is dependent on the density of the mask
I acknowledge that:
```) on separate lines.Beta Was this translation helpful? Give feedback.
All reactions