You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/06/06 14:15:25 UTC

[GitHub] [flink] wuchong commented on a change in pull request #8629: [FLINK-12088][table-runtime-blink] Introduce unbounded streaming inner/left/right/full join operator

wuchong 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_r291204285
 
 

 ##########
 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:
   We will support SEMI/ANTI in the following issue, so we throw an exception temporary here.

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


With regards,
Apache Git Services