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

mingliang 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 b2f9a5f5bd [VL] Add outputOrdering for 
VeloxBroadcastNestedLoopJoinExecTransformer (#9872)
b2f9a5f5bd is described below

commit b2f9a5f5bd0164e89ecc07a88966d82ec80746e6
Author: Mingliang Zhu <[email protected]>
AuthorDate: Mon Jun 9 09:15:10 2025 +0800

    [VL] Add outputOrdering for VeloxBroadcastNestedLoopJoinExecTransformer 
(#9872)
---
 .../VeloxBroadcastNestedLoopJoinExecTransformer.scala       | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git 
a/backends-velox/src/main/scala/org/apache/gluten/execution/VeloxBroadcastNestedLoopJoinExecTransformer.scala
 
b/backends-velox/src/main/scala/org/apache/gluten/execution/VeloxBroadcastNestedLoopJoinExecTransformer.scala
index c8762a4773..2a920c3ab9 100644
--- 
a/backends-velox/src/main/scala/org/apache/gluten/execution/VeloxBroadcastNestedLoopJoinExecTransformer.scala
+++ 
b/backends-velox/src/main/scala/org/apache/gluten/execution/VeloxBroadcastNestedLoopJoinExecTransformer.scala
@@ -19,9 +19,9 @@ package org.apache.gluten.execution
 import org.apache.gluten.backendsapi.BackendsApiManager
 
 import org.apache.spark.rdd.RDD
-import org.apache.spark.sql.catalyst.expressions.Expression
-import org.apache.spark.sql.catalyst.optimizer.BuildSide
-import org.apache.spark.sql.catalyst.plans.{ExistenceJoin, JoinType}
+import org.apache.spark.sql.catalyst.expressions.{Expression, SortOrder}
+import org.apache.spark.sql.catalyst.optimizer.{BuildLeft, BuildRight, 
BuildSide}
+import org.apache.spark.sql.catalyst.plans.{ExistenceJoin, InnerLike, 
JoinType, LeftOuter, RightOuter}
 import org.apache.spark.sql.execution.SparkPlan
 import org.apache.spark.sql.execution.joins.BuildSideRelation
 import org.apache.spark.sql.vectorized.ColumnarBatch
@@ -50,6 +50,13 @@ case class VeloxBroadcastNestedLoopJoinExecTransformer(
     streamedRDD :+ broadcastRDD
   }
 
+  override def outputOrdering: Seq[SortOrder] = (joinType, buildSide) match {
+    case (_: InnerLike, _) | (LeftOuter, BuildRight) | (RightOuter, BuildLeft) 
|
+        (ExistenceJoin(_), BuildRight) =>
+      streamedPlan.outputOrdering
+    case _ => Nil
+  }
+
   override protected def withNewChildrenInternal(
       newLeft: SparkPlan,
       newRight: SparkPlan): VeloxBroadcastNestedLoopJoinExecTransformer =


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

Reply via email to