flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhueske <...@git.apache.org>
Subject [GitHub] flink pull request #4625: [FLINK-6233] [table] Support time-bounded stream i...
Date Wed, 06 Sep 2017 10:08:52 GMT
Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4625#discussion_r137225735
  
    --- 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 think it is fine to call it window join. The join predicate effectively defines a window
for each row a join window on the opposite stream. In fact, these windows are more similar
to `OVER` windows than group windows such as `TUMBLE` or `HOP`.


---

Mime
View raw message