maropu commented on a change in pull request #32355:
URL: https://github.com/apache/spark/pull/32355#discussion_r621937979



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/hints.scala
##########
@@ -200,6 +201,11 @@ trait HintErrorHandler {
    */
   def joinNotFoundForJoinHint(hint: HintInfo): Unit
 
+  /**
+   * Callback for a join hint specified on a join that doesn't support this 
build side.
+   */
+  def joinBuildSideNotSupported(joinType: JoinType, joinHint: JoinHint): Unit

Review comment:
       nit: how about `joinBuildSideNotSupported` -> `hintBuildSideNotSupported 
` ?

##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HintErrorLogger.scala
##########
@@ -42,6 +45,17 @@ object HintErrorLogger extends HintErrorHandler with Logging 
{
     logWarning(s"A join hint $hint is specified but it is not part of a join 
relation.")
   }
 
+  override def joinBuildSideNotSupported(joinType: JoinType, joinHint: 
JoinHint): Unit = {
+    assert(joinHint.leftHint.isDefined || joinHint.rightHint.isDefined)
+    val (hint, buildSide) = if (joinHint.leftHint.isDefined) {
+      (joinHint.leftHint.get, "left")
+    } else {
+      (joinHint.rightHint.get, "right")
+    }
+    logWarning(s"A join hint $hint is specified but it is not supported with 
build $buildSide " +

Review comment:
       nit: `A join hint $hint ` => `Hint $hint` to follow the existing msg: 
https://github.com/apache/spark/pull/32355/files#diff-afe669f38210f85c87450ace74311b4ce2301e6aeab820aea444fcd802c2d5c2R60




-- 
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.

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