dbatomic commented on code in PR #46599:
URL: https://github.com/apache/spark/pull/46599#discussion_r1603374449


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/joins.scala:
##########
@@ -397,7 +398,11 @@ trait JoinSelectionHelper extends Logging {
 
   protected def hashJoinSupported
       (leftKeys: Seq[Expression], rightKeys: Seq[Expression]): Boolean = {
-    val result = leftKeys.concat(rightKeys).forall(e => 
UnsafeRowUtils.isBinaryStable(e.dataType))
+    def hasStableCollationKey(e: Expression): Boolean =
+      e.dataType.isInstanceOf[StringType] || 
e.dataType.isInstanceOf[BinaryType]
+    def isHashJoinSupported(e: Expression): Boolean = 
UnsafeRowUtils.isBinaryStable(e.dataType) ||

Review Comment:
   Why do you need this `hasStableCollationKey`? `isBinaryStable` will return 
true for binary, so things should work just work, right?
   
   



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to