-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CompilationException on count(*) in co-related join since Trino 378 #24012
Comments
Have you tried newer Trino? Does it still occur? |
We should do this. Take a look at #23721 for a similar situation. |
Yes, this happens even on the latest master.
Thanks. Let me try. |
Actually this happens in If I remember correctly, it happened for |
SQL:
Stacktrace:
The root cause of the compilation error is too many grouping keys came from
c1000
on decorelatedcount(*)
.This query had worked until Trino 377 thanks to
PushAggregationThroughOuterJoin
which pushes aggregation below Left Join and reduced the number of grouping keys. However,PushFilterThroughCountAggregation
was added in Trino 378 (#12047). It blocksPushAggregationThroughOuterJoin
when applied.I came up with some ideas to avoid this error but not sure if they are any good.
rowEqualsRow
(split to multiple methods?)PushFilterThroughCountAggregation
if grouping keys are too many which has no chance to workThe text was updated successfully, but these errors were encountered: