-
Notifications
You must be signed in to change notification settings - Fork 429
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
[GLUTEN-7581][CORE] Code cleanup for GlutenColumnarRule #7582
base: main
Are you sure you want to change the base?
Conversation
Run Gluten Clickhouse CI |
val applier = applierBuilder.apply(session) | ||
val out = applier.apply(vanillaPlan, outputsColumnar) | ||
out | ||
applier.apply(vanillaPlan, outputsColumnar) |
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.
val out = ...
out
This code pattern is used usually because out
allows developer to place a breakpoint for debugging against the output object easily. Do you happen to know an alternative way if we simplify the code?
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.
Yes. I understood it. We usually avoid this code pattern in Spark. Developers could evaluate the expression (e.g. out) if who want know the value.
Of course, I will respect the code pattern if Gluten has the preference.
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.
Let's do the simplification. Just found there is an alternative way while using Intellij IDE. Thanks.
(child, false) | ||
case _ => | ||
throw new IllegalStateException( | ||
"This should not happen. Please leave a issue at" + |
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.
Can you help change a issue
to an issue
in passing? Thanks.
val outputsColumnar = OutputsColumnarTester.inferOutputsColumnar(plan) | ||
val unwrapped = OutputsColumnarTester.unwrap(plan) | ||
val vanillaPlan = Transitions.insertTransitions(unwrapped, outputsColumnar) | ||
val (childPlan, outputsColumnar) = plan match { |
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.
Will renaming childPlan
to originalPlan
or similar help user to understand the code?
Run Gluten Clickhouse CI |
Run Gluten Clickhouse CI |
Run Gluten Clickhouse CI |
Run Gluten Clickhouse CI |
What changes were proposed in this pull request?
This PR proposes to make code cleanup for
GlutenColumnarRule
.How was this patch tested?
integration tests