Search in sources :

Example 1 with RowTimeIntervalJoin

use of org.apache.flink.table.runtime.operators.join.interval.RowTimeIntervalJoin in project flink by apache.

the class StreamExecIntervalJoin method createRowTimeJoin.

private TwoInputTransformation<RowData, RowData, RowData> createRowTimeJoin(Transformation<RowData> leftInputTransform, Transformation<RowData> rightInputTransform, InternalTypeInfo<RowData> returnTypeInfo, IntervalJoinFunction joinFunction, JoinSpec joinSpec, IntervalJoinSpec.WindowBounds windowBounds, ReadableConfig config) {
    InternalTypeInfo<RowData> leftTypeInfo = (InternalTypeInfo<RowData>) leftInputTransform.getOutputType();
    InternalTypeInfo<RowData> rightTypeInfo = (InternalTypeInfo<RowData>) rightInputTransform.getOutputType();
    RowTimeIntervalJoin rowJoinFunc = new RowTimeIntervalJoin(joinSpec.getJoinType(), windowBounds.getLeftLowerBound(), windowBounds.getLeftUpperBound(), // allowedLateness
    0L, leftTypeInfo, rightTypeInfo, joinFunction, windowBounds.getLeftTimeIdx(), windowBounds.getRightTimeIdx());
    return ExecNodeUtil.createTwoInputTransformation(leftInputTransform, rightInputTransform, createTransformationMeta(INTERVAL_JOIN_TRANSFORMATION, config), new KeyedCoProcessOperatorWithWatermarkDelay<>(rowJoinFunc, rowJoinFunc.getMaxOutputDelay()), returnTypeInfo, leftInputTransform.getParallelism());
}
Also used : RowData(org.apache.flink.table.data.RowData) InternalTypeInfo(org.apache.flink.table.runtime.typeutils.InternalTypeInfo) RowTimeIntervalJoin(org.apache.flink.table.runtime.operators.join.interval.RowTimeIntervalJoin)

Aggregations

RowData (org.apache.flink.table.data.RowData)1 RowTimeIntervalJoin (org.apache.flink.table.runtime.operators.join.interval.RowTimeIntervalJoin)1 InternalTypeInfo (org.apache.flink.table.runtime.typeutils.InternalTypeInfo)1