-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-46484][SQL][CONNECT] Make resolveOperators* helper functions keep the plan id
#44462
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
Conversation
resolveOperators* functions keep the plan idresolveOperators* functions keep the plan id
resolveOperators* functions keep the plan idresolveOperators* functions keep the plan id
|
I converted it to |
resolveOperators* functions keep the plan idresolveOperators* helper functions keep the plan id
f665fd0 to
02cb0bc
Compare
resolveOperators* helper functions keep the plan idresolveOperators* helper functions keep the plan id
|
@cloud-fan I think it is ready for a review |
| newPlan.copyTagsFrom(self) | ||
| newPlan | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method resolveOperatorsDownWithPruning is very similar to TreeNode#transformDownWithPruning. Would be good if we can refactor and unify them. cc @beliefer
|
thanks @cloud-fan and @HyukjinKwon merged to master |
What changes were proposed in this pull request?
1, make following helper functions keep the plan id in transformation:
resolveOperatorsDownWithPruningresolveOperatorsUpWithNewOutput2, change the way to keep plan id in
ResolveNaturalAndUsingJoin:before:
after:
3, to verify this fix, this PR also reverts previous tags copying changes in the rules
Why are the changes needed?
we had make following rules keep the plan id:
1,
ResolveNaturalAndUsingJoinin 167bbcaresolveOperatorsUpWithPruning, it set the tagProject.hiddenOutputTaginternally, socopyTagsFrom(only works iftags.isEmpty) inresolveOperatorsUpWithPruningtakes no effect2,
ExtractWindowExpressionsin 185a0a5resolveOperatorsDownWithPruning, which doesn't copy tags3,
WidenSetOperationTypesin 17c206fresolveOperatorsUpWithNewOutput -> transformUpWithNewOutput, which doesn't copy tags4,
ResolvePivotin 1a89bdcresolveOperatorsWithPruning -> resolveOperatorsDownWithPruning, which doesn't copy tags5,
CTESubstitutionin 79d1cderesolveOperatorsDownWithPruningandresolveOperatorsUp -> resolveOperatorsUpWithPruning, the former does't copy tagsBut plan id missing issue still keep popping up (see #44454), so this PR attempt to cover more cases by fixing the helper functions which are used to build the rules
6,
ResolveUnpivotresolveOperatorsWithPruning -> resolveOperatorsDownWithPruning, which doesn't copy tags7,
UnpivotCoercionresolveOperators -> resolveOperatorsWithPruning -> resolveOperatorsDownWithPruning, which doesn't copy tagsDoes this PR introduce any user-facing change?
no
How was this patch tested?
ut
Was this patch authored or co-authored using generative AI tooling?
no