Github user xccui commented on a diff in the pull request:
https://github.com/apache/flink/pull/4625#discussion_r137144634
--- 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",
--- End diff --
I'd like to call this kind of join "time-bounded join" instead of "window
join". When referring to window join, the users may think of tumbling-window or
sliding-window, while they are actually not the same. However, as the
âwindow-joinâ name has been widely used, I can also accept it. Do you have
any idea about that?
---