You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As suggested by @jackwener: #7695 (comment), ideally the plan should look like the following (the unions should be unnested and run through a single group by):
I added draft PR. There's a lot of code duplication. I’m thinking about how best to do it: combine this rule with the previous one or separate the common code into a function.
Done, refactored nested union optimization, added tests.
Generalized nested distinct optimization: all distinct operations removed from distinct union, even select distinct.
I think that this case should not be done separately.
Is your feature request related to a problem or challenge?
The current the plan for a nested
UNION
is still nested resulting in unecessary GROUPingDescribe the solution you'd like
As suggested by @jackwener: #7695 (comment), ideally the plan should look like the following (the unions should be unnested and run through a single group by):
Describe alternatives you've considered
No response
Additional context
@maruschin added a nice optimization (as well as very nice tests) to unnest
UNION ALL
in #7695The text was updated successfully, but these errors were encountered: