Github user xccui commented on a diff in the pull request:
https://github.com/apache/flink/pull/4625#discussion_r137146303
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/datastream/DataStreamWindowJoin.scala
---
@@ -184,4 +195,54 @@ class DataStreamWindowJoin(
.returns(returnTypeInfo)
}
}
+
+ def createRowTimeInnerJoinFunction(
+ leftDataStream: DataStream[CRow],
+ rightDataStream: DataStream[CRow],
+ joinFunctionName: String,
+ joinFunctionCode: String,
+ leftKeys: Array[Int],
+ rightKeys: Array[Int]): DataStream[CRow] = {
+
+ val returnTypeInfo = CRowTypeInfo(schema.typeInfo)
+
+ val rowTimeInnerJoinFunc = new TimeBoundedStreamInnerJoin(
+ leftLowerBound,
+ leftUpperBound,
+ 0L,
+ leftSchema.typeInfo,
+ rightSchema.typeInfo,
+ joinFunctionName,
+ joinFunctionCode,
+ leftTimeIdx,
+ rightTimeIdx,
+ JoinTimeIndicator.ROWTIME
+ )
+
+ if (!leftKeys.isEmpty) {
+ leftDataStream
+ .connect(rightDataStream)
+ .keyBy(leftKeys, rightKeys)
+ .transform(
+ "rowTimeInnerJoinFunc",
+ returnTypeInfo,
+ new KeyedCoProcessOperatorWithWatermarkDelay[CRow, CRow, CRow,
CRow](
+ rowTimeInnerJoinFunc,
+ rowTimeInnerJoinFunc.getMaxOutputDelay)
--- End diff --
I think the "watermark delay" is considered from the operator level while
the "output delay" is named from the function level. So how about keep this
name?
---