JingsongLi commented on a change in pull request #8629: [FLINK-12088][table-runtime-blink] Introduce unbounded streaming inner/left/right/full join operator URL: https://github.com/apache/flink/pull/8629#discussion_r291041910
########## File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/nodes/physical/stream/StreamExecJoin.scala ########## @@ -123,7 +139,132 @@ class StreamExecJoin( override protected def translateToPlanInternal( tableEnv: StreamTableEnvironment): StreamTransformation[BaseRow] = { - throw new TableException("Implements this") + + val tableConfig = tableEnv.getConfig + val returnType = FlinkTypeFactory.toInternalRowType(getRowType).toTypeInfo + + val leftTransform = getInputNodes.get(0).translateToPlan(tableEnv) + .asInstanceOf[StreamTransformation[BaseRow]] + val rightTransform = getInputNodes.get(1).translateToPlan(tableEnv) + .asInstanceOf[StreamTransformation[BaseRow]] + + val leftType = leftTransform.getOutputType.asInstanceOf[BaseRowTypeInfo] + val rightType = rightTransform.getOutputType.asInstanceOf[BaseRowTypeInfo] + + val (leftJoinKey, rightJoinKey) = + JoinUtil.checkAndGetJoinKeys(keyPairs, getLeft, getRight, allowEmptyKey = true) + + val leftSelect = KeySelectorUtil.getBaseRowSelector(leftJoinKey, leftType) + val rightSelect = KeySelectorUtil.getBaseRowSelector(rightJoinKey, rightType) + + val leftInputSpec = analyzeJoinInput(left) + val rightInputSpec = analyzeJoinInput(right) + + val generatedCondition = generateConditionFunction(tableConfig, leftType, rightType) + + if (joinType == JoinRelType.ANTI || joinType == JoinRelType.SEMI) { Review comment: Why not move this check to constructor? ---------------------------------------------------------------- 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 With regards, Apache Git Services