-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-52535][SQL] Improve code readability of rule ApplyColumnarRulesAndInsertTransitions #51227
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
[SPARK-52535][SQL] Improve code readability of rule ApplyColumnarRulesAndInsertTransitions #51227
Conversation
…sAndInsertTransitions
@@ -537,6 +539,19 @@ case class ApplyColumnarRulesAndInsertTransitions( | |||
false | |||
} | |||
plan.withNewChildren(plan.children.map(insertTransitions(_, outputsColumnar))) | |||
} else { |
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.
The if-else clause
if (plan.isInstanceOf[ColumnarToRowTransition]) {
...
} else {
...
}
is inverted here to ensure symmetry with the code in ensureOutputsColumnar
.
Would someone like to review the PR? Thanks! |
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 looks fine to me
thanks, merging to master! |
@cloud-fan @revans2 Thank you! |
…sAndInsertTransitions Issue: https://issues.apache.org/jira/browse/SPARK-52535 ### What changes were proposed in this pull request? A minor cleanup on the code of `ApplyColumnarRulesAndInsertTransitions` to improve readability. ### Why are the changes needed? The rule is important for 3rd SQL plugins and the code got messed up a bit during the development iterations back then. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing tests. Closes apache#51227 from zhztheplayer/wip-transition-rule-cleanup. Authored-by: Hongze Zhang <hongze.zzz123@gmail.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
Issue: https://issues.apache.org/jira/browse/SPARK-52535
What changes were proposed in this pull request?
A minor cleanup on the code of
ApplyColumnarRulesAndInsertTransitions
to improve readability.Why are the changes needed?
The rule is important for 3rd SQL plugins and the code got messed up a bit during the development iterations back then.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing tests.