This is an automated email from the ASF dual-hosted git repository.
kejia 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 a36d121a8 [GLUTEN-5720][VL] Enable left and right semi join type in
smj (#5825)
a36d121a8 is described below
commit a36d121a897df02f24596fcc47fb25a16e29ae9f
Author: JiaKe <[email protected]>
AuthorDate: Thu Jun 6 08:56:12 2024 +0800
[GLUTEN-5720][VL] Enable left and right semi join type in smj (#5825)
---
.../test/scala/org/apache/gluten/execution/TestOperator.scala | 10 ++++++++++
cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc | 6 ++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git
a/backends-velox/src/test/scala/org/apache/gluten/execution/TestOperator.scala
b/backends-velox/src/test/scala/org/apache/gluten/execution/TestOperator.scala
index bc51ee7cb..cd1f21a0a 100644
---
a/backends-velox/src/test/scala/org/apache/gluten/execution/TestOperator.scala
+++
b/backends-velox/src/test/scala/org/apache/gluten/execution/TestOperator.scala
@@ -1246,6 +1246,16 @@ class TestOperator extends
VeloxWholeStageTransformerSuite {
}
}
+ withSQLConf("spark.gluten.sql.columnar.forceShuffledHashJoin" ->
"false") {
+ runQueryAndCompare(
+ """
+ |select * from t1 left semi join t2 on t1.c1 = t2.c1 and t1.c1 >
50;
+ |""".stripMargin
+ ) {
+ checkGlutenOperatorMatch[SortMergeJoinExecTransformer]
+ }
+ }
+
runQueryAndCompare(
"""
|select * from t1 cross join t2;
diff --git a/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc
b/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc
index a3b46d7d0..80509e055 100644
--- a/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc
+++ b/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc
@@ -907,9 +907,11 @@ bool SubstraitToVeloxPlanValidator::validate(const
::substrait::JoinRel& joinRel
switch (joinRel.type()) {
case ::substrait::JoinRel_JoinType_JOIN_TYPE_INNER:
case ::substrait::JoinRel_JoinType_JOIN_TYPE_LEFT:
+ case ::substrait::JoinRel_JoinType_JOIN_TYPE_LEFT_SEMI:
+ case ::substrait::JoinRel_JoinType_JOIN_TYPE_RIGHT_SEMI:
break;
default:
- LOG_VALIDATION_MSG("Sort merge join only support inner and left
join.");
+ LOG_VALIDATION_MSG("Sort merge join only support inner, left, left
semi and right semi join.");
return false;
}
}
@@ -923,7 +925,7 @@ bool SubstraitToVeloxPlanValidator::validate(const
::substrait::JoinRel& joinRel
case ::substrait::JoinRel_JoinType_JOIN_TYPE_ANTI:
break;
default:
- LOG_VALIDATION_MSG("Sort merge join only support inner and left join.");
+ LOG_VALIDATION_MSG("Join type is not supported: {}" + joinRel.type());
return false;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]