cloud-fan commented on code in PR #48400:
URL: https://github.com/apache/spark/pull/48400#discussion_r1793743471


##########
sql/core/src/test/scala/org/apache/spark/sql/CollationSuite.scala:
##########
@@ -1576,39 +1576,6 @@ class CollationSuite extends DatasourceV2SQLBase with 
AdaptiveSparkPlanHelper {
     })
   }
 
-  test("rewrite with collationkey should be an excludable rule") {
-    val t1 = "T_1"
-    val t2 = "T_2"
-    val collation = "UTF8_LCASE"
-    val collationRewriteJoinRule = 
"org.apache.spark.sql.catalyst.analysis.RewriteCollationJoin"
-    withTable(t1, t2) {
-      withSQLConf(SQLConf.OPTIMIZER_EXCLUDED_RULES.key -> 
collationRewriteJoinRule) {
-        sql(s"CREATE TABLE $t1 (x STRING COLLATE $collation, i int) USING 
PARQUET")
-        sql(s"INSERT INTO $t1 VALUES ('aa', 1)")
-
-        sql(s"CREATE TABLE $t2 (y STRING COLLATE $collation, j int) USING 
PARQUET")
-        sql(s"INSERT INTO $t2 VALUES ('AA', 2), ('aa', 2)")
-
-        val df = sql(s"SELECT * FROM $t1 JOIN $t2 ON $t1.x = $t2.y")
-        checkAnswer(df, Seq(Row("aa", 1, "AA", 2), Row("aa", 1, "aa", 2)))
-
-        val queryPlan = df.queryExecution.executedPlan
-
-        // confirm that sort merge join is used instead of hash join
-        assert(
-          collectFirst(queryPlan) {
-            case _: HashJoin => ()
-          }.isEmpty
-        )
-        assert(
-          collectFirst(queryPlan) {
-            case _: SortMergeJoinExec => ()

Review Comment:
   > join selection does not otherwise depend on collation (join-related 
planner rules/strategies are already fully collation-unaware)
   
   Do you know why Spark picked `SortMergeJoinExec` before if what you said is 
true?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to