zhztheplayer commented on code in PR #7582:
URL: https://github.com/apache/incubator-gluten/pull/7582#discussion_r1805857933
##########
gluten-core/src/main/scala/org/apache/gluten/extension/GlutenColumnarRule.scala:
##########
@@ -109,16 +77,31 @@ case class GlutenColumnarRule(
*/
final override def preColumnarTransitions: Rule[SparkPlan] = plan => {
// To infer caller's property:
ApplyColumnarRulesAndInsertTransitions#outputsColumnar.
- OutputsColumnarTester.wrap(plan)
+ if (plan.supportsColumnar) {
+ DummyColumnarOutputExec(plan)
+ } else {
+ DummyRowOutputExec(plan)
+ }
}
override def postColumnarTransitions: Rule[SparkPlan] = plan => {
- val outputsColumnar = OutputsColumnarTester.inferOutputsColumnar(plan)
- val unwrapped = OutputsColumnarTester.unwrap(plan)
- val vanillaPlan = Transitions.insertTransitions(unwrapped, outputsColumnar)
+ val (childPlan, outputsColumnar) = plan match {
+ case DummyRowOutputExec(child) =>
+ (child, false)
+ case RowToColumnarExec(DummyRowOutputExec(child)) =>
+ (child, true)
+ case DummyColumnarOutputExec(child) =>
+ (child, true)
+ case ColumnarToRowExec(DummyColumnarOutputExec(child)) =>
+ (child, false)
+ case _ =>
+ throw new IllegalStateException(
+ "This should not happen. Please leave a issue at" +
Review Comment:
Can you help change `a issue` to `an issue` in passing? Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]