-
Notifications
You must be signed in to change notification settings - Fork 596
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
discussion(optimizer): do not include the primary key of max-one-row side in pk derivation of Inner(?) Join #5764
Comments
For streaming query, max-one-row would always appear together with correlated sub-query which finally causes the aggregation becoming not |
For the case of uncorrelated sub-query, it will produce a nested-loop join which is unsupported right now. |
I think some of them can be supported with DynamicFilter? |
Yes, you really remind me some of special nested-loop join can be transformed into dynamic filter. For dynamic filter, I think it's pk is the same with its left input, so we have already done? |
Yes. The |
Got it. |
I've had a try by hacking the pk derivation of Join side with A trivial solution could be to repeat (or forward) the implementation to each stream plan node, but it sounds too verbose. Per some offline discussion with @st1page, the best solution might be #2279, after we finish the refactor of the optimizer. |
If we write an inner join whose one side is
SimpleAgg
, the primary key of output only contains the primary key of the other side sinceSimpleAgg
has no primary key.Things can actually be more general, as every max-one-row Plan Node can adapt this. This will benefit
DynamicFilter
which requires no output of the inner side.The text was updated successfully, but these errors were encountered: