Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import org.apache.flink.table.runtime.operators.join.FlinkJoinType;
import org.apache.flink.table.runtime.operators.join.temporal.TemporalProcessTimeJoinOperator;
import org.apache.flink.table.runtime.operators.join.temporal.TemporalRowTimeJoinOperator;
import org.apache.flink.table.runtime.operators.join.temporal.TemporalRowTimeJoinOperatorV2;
import org.apache.flink.table.runtime.typeutils.InternalTypeInfo;
import org.apache.flink.table.types.logical.RowType;
import org.apache.flink.util.Preconditions;
Expand All @@ -74,6 +75,12 @@
producedTransformations = StreamExecTemporalJoin.TEMPORAL_JOIN_TRANSFORMATION,
minPlanVersion = FlinkVersion.v1_15,
minStateVersion = FlinkVersion.v1_15)
@ExecNodeMetadata(
name = "stream-exec-temporal-join",
version = 2,
producedTransformations = StreamExecTemporalJoin.TEMPORAL_JOIN_TRANSFORMATION,
minPlanVersion = FlinkVersion.v2_4,
minStateVersion = FlinkVersion.v2_4)
public class StreamExecTemporalJoin extends ExecNodeBase<RowData>
implements StreamExecNode<RowData>, SingleTransformationTranslator<RowData> {

Expand Down Expand Up @@ -265,7 +272,18 @@ private TwoInputStreamOperator<RowData, RowData, RowData> createJoinOperator(
long minRetentionTime = config.getStateRetentionTime();
long maxRetentionTime = TableConfigUtils.getMaxIdleStateRetentionTime(config);
if (rightTimeAttributeIndex >= 0) {
return new TemporalRowTimeJoinOperator(
if (getVersion() == 1) {
return new TemporalRowTimeJoinOperator(
InternalTypeInfo.of(leftInputType),
InternalTypeInfo.of(rightInputType),
generatedJoinCondition,
leftTimeAttributeIndex,
rightTimeAttributeIndex,
minRetentionTime,
maxRetentionTime,
isLeftOuterJoin);
}
return new TemporalRowTimeJoinOperatorV2(
InternalTypeInfo.of(leftInputType),
InternalTypeInfo.of(rightInputType),
generatedJoinCondition,
Expand Down
Loading