This is an automated email from the ASF dual-hosted git repository.
felixybw 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 1fbb12f03e [MINOR] collection operation should follows scala style.
(#10682)
1fbb12f03e is described below
commit 1fbb12f03ef90a111dee1d4deecd6c34fecc3d76
Author: Jiaan Geng <[email protected]>
AuthorDate: Sat Sep 13 15:46:40 2025 +0800
[MINOR] collection operation should follows scala style. (#10682)
This PR proposes to make collection operation follows Scala style.
---
.../org/apache/gluten/execution/WholeStageTransformer.scala | 9 +++------
1 file changed, 3 insertions(+), 6 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 87617b166e..f87b9673cc 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
@@ -235,10 +235,7 @@ case class WholeStageTransformer(child: SparkPlan,
materializeInput: Boolean = f
throw new NullPointerException(s"WholeStageTransformer can't do
Transform on $child")
}
- val outNames = new java.util.ArrayList[String]()
- for (attr <- childCtx.outputAttributes) {
- outNames.add(ConverterUtils.genColumnNameWithExprId(attr))
- }
+ val outNames =
childCtx.outputAttributes.map(ConverterUtils.genColumnNameWithExprId(_))
val planNode = if
(BackendsApiManager.getSettings.needOutputSchemaForPlan()) {
val outputSchema = if (outputSchemaForPlan.isDefined) {
@@ -250,11 +247,11 @@ case class WholeStageTransformer(child: SparkPlan,
materializeInput: Boolean = f
PlanBuilder.makePlan(
substraitContext,
Lists.newArrayList(childCtx.root),
- outNames,
+ outNames.asJava,
outputSchema,
null)
} else {
- PlanBuilder.makePlan(substraitContext,
Lists.newArrayList(childCtx.root), outNames)
+ PlanBuilder.makePlan(substraitContext,
Lists.newArrayList(childCtx.root), outNames.asJava)
}
WholeStageTransformContext(planNode, substraitContext, isCudf)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]