wenlong88 commented on a change in pull request #14606:
URL: https://github.com/apache/flink/pull/14606#discussion_r556463444



##########
File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/batch/BatchPhysicalHashJoin.scala
##########
@@ -54,13 +56,11 @@ class BatchPhysicalHashJoin(
     val tryDistinctBuildRow: Boolean)
   extends BatchPhysicalJoinBase(cluster, traitSet, leftRel, rightRel, 
condition, joinType) {
 
-  private val (leftKeys, rightKeys) =
-    JoinUtil.checkAndGetJoinKeys(keyPairs, getLeft, getRight, allowEmptyKey = 
true)
-  val (buildKeys, probeKeys) = if (leftIsBuild) (leftKeys, rightKeys) else 
(rightKeys, leftKeys)
-
-  // Inputs could be changed. See [[BiRel.replaceInput]].
-  def buildRel: RelNode = if (leftIsBuild) getLeft else getRight
-  def probeRel: RelNode = if (leftIsBuild) getRight else getLeft
+  JoinUtil.validateJoinSpec(
+    joinSpec,
+    FlinkTypeFactory.toLogicalRowType(left.getRowType),
+    FlinkTypeFactory.toLogicalRowType(right.getRowType),
+    allowEmptyKey = true)

Review comment:
       the original validation is true, but I think you are right, let me fix 
it.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to