Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Mar 13, 2024
1 parent 8078466 commit fefcf01
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion spark/src/test/scala/org/apache/comet/exec/CometExecSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ class CometExecSuite extends CometTestBase {
checkSparkAnswerAndOperator(df1)

// TODO: Spark 3.4 returns SortMergeJoin for this query even with SHUFFLE_HASH hint.
// We need to investigate why this happens and fix it.
// Left join with build left and right join with build right in hash join is only supported
// in Spark 3.5 or above. See SPARK-36612.
/*
val df2 =
sql("SELECT /*+ SHUFFLE_HASH(tbl_a) */ * FROM tbl_a LEFT JOIN tbl_b ON tbl_a._2 = tbl_b._1")
Expand All @@ -82,6 +83,14 @@ class CometExecSuite extends CometTestBase {
checkSparkAnswerAndOperator(df3)
*/

val df2 =
sql("SELECT /*+ SHUFFLE_HASH(tbl_b) */ * FROM tbl_a LEFT JOIN tbl_b ON tbl_a._2 = tbl_b._1")
checkSparkAnswerAndOperator(df2)

val df3 =
sql("SELECT /*+ SHUFFLE_HASH(tbl_a) */ * FROM tbl_b LEFT JOIN tbl_a ON tbl_a._2 = tbl_b._1")
checkSparkAnswerAndOperator(df3)

val df4 =
sql("SELECT /*+ SHUFFLE_HASH(tbl_a) */ * FROM tbl_a RIGHT JOIN tbl_b ON tbl_a._2 = tbl_b._1")
checkSparkAnswerAndOperator(df4)
Expand Down

0 comments on commit fefcf01

Please sign in to comment.