This is an automated email from the ASF dual-hosted git repository.

beliefer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 80b823120e [GLUTEN-11159][CORE] Code cleanup for 
generateWholeStageTransformContext (#11160)
80b823120e is described below

commit 80b823120ec020534da6f1898bc1856e60572a6e
Author: Jiaan Geng <[email protected]>
AuthorDate: Tue Nov 25 17:25:55 2025 +0800

    [GLUTEN-11159][CORE] Code cleanup for generateWholeStageTransformContext 
(#11160)
---
 .../org/apache/gluten/execution/WholeStageTransformer.scala | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git 
a/gluten-substrait/src/main/scala/org/apache/gluten/execution/WholeStageTransformer.scala
 
b/gluten-substrait/src/main/scala/org/apache/gluten/execution/WholeStageTransformer.scala
index 8c85add1fc..9286cba2cc 100644
--- 
a/gluten-substrait/src/main/scala/org/apache/gluten/execution/WholeStageTransformer.scala
+++ 
b/gluten-substrait/src/main/scala/org/apache/gluten/execution/WholeStageTransformer.scala
@@ -239,23 +239,20 @@ case class WholeStageTransformer(child: SparkPlan, 
materializeInput: Boolean = f
       throw new NullPointerException(s"WholeStageTransformer can't do 
Transform on $child")
     }
 
-    val outNames = 
childCtx.outputAttributes.map(ConverterUtils.genColumnNameWithExprId(_))
+    val outNames = 
childCtx.outputAttributes.map(ConverterUtils.genColumnNameWithExprId).asJava
 
     val planNode = if 
(BackendsApiManager.getSettings.needOutputSchemaForPlan()) {
-      val outputSchema = if (outputSchemaForPlan.isDefined) {
-        outputSchemaForPlan.get
-      } else {
-        inferSchemaFromAttributes(childCtx.outputAttributes)
-      }
+      val outputSchema =
+        
outputSchemaForPlan.getOrElse(inferSchemaFromAttributes(childCtx.outputAttributes))
 
       PlanBuilder.makePlan(
         substraitContext,
         Lists.newArrayList(childCtx.root),
-        outNames.asJava,
+        outNames,
         outputSchema,
         null)
     } else {
-      PlanBuilder.makePlan(substraitContext, 
Lists.newArrayList(childCtx.root), outNames.asJava)
+      PlanBuilder.makePlan(substraitContext, 
Lists.newArrayList(childCtx.root), outNames)
     }
 
     WholeStageTransformContext(planNode, substraitContext, isCudf)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to