wenlong88 commented on a change in pull request #14606:
URL: https://github.com/apache/flink/pull/14606#discussion_r556459046



##########
File path: 
flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecTemporalJoin.java
##########
@@ -0,0 +1,230 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.plan.nodes.exec.stream;
+
+import org.apache.flink.api.dag.Transformation;
+import org.apache.flink.streaming.api.operators.TwoInputStreamOperator;
+import org.apache.flink.streaming.api.transformations.TwoInputTransformation;
+import org.apache.flink.table.api.TableConfig;
+import org.apache.flink.table.api.TableException;
+import org.apache.flink.table.api.ValidationException;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.planner.codegen.CodeGenUtils;
+import org.apache.flink.table.planner.codegen.CodeGeneratorContext;
+import org.apache.flink.table.planner.codegen.ExprCodeGenerator;
+import org.apache.flink.table.planner.codegen.FunctionCodeGenerator;
+import org.apache.flink.table.planner.codegen.GeneratedExpression;
+import org.apache.flink.table.planner.delegation.PlannerBase;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecEdge;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecNode;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecNodeBase;
+import org.apache.flink.table.planner.plan.nodes.exec.utils.JoinSpec;
+import org.apache.flink.table.planner.plan.utils.JoinUtil;
+import org.apache.flink.table.planner.plan.utils.KeySelectorUtil;
+import org.apache.flink.table.runtime.generated.GeneratedJoinCondition;
+import org.apache.flink.table.runtime.keyselector.RowDataKeySelector;
+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.typeutils.InternalTypeInfo;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.RowType;
+
+import org.apache.flink.shaded.guava18.com.google.common.collect.Lists;
+
+import java.util.Optional;
+import java.util.stream.IntStream;
+
+import scala.Option;
+
+/**
+ * {@link StreamExecNode} for temporal table join (FOR SYSTEM_TIME AS OF) and 
temporal TableFunction
+ * join (LATERAL TemporalTableFunction(o.proctime)).
+ *
+ * <p>The legacy temporal table function join is the subset of temporal table 
join, the only
+ * difference is the validation, we reuse most same logic here.
+ */
+public class StreamExecTemporalJoin extends ExecNodeBase<RowData>
+        implements StreamExecNode<RowData> {
+
+    private final JoinSpec joinSpec;
+    private final boolean isTemporalFunctionJoin;
+    private final int leftTimeAttributeIndex;
+    private final Optional<Integer> rightTimeAttributeIndex;
+
+    public StreamExecTemporalJoin(
+            JoinSpec joinSpec,
+            boolean isTemporalTableFunctionJoin,
+            int leftTimeAttributeIndex,
+            Optional<Integer> rightTimeAttributeIndex,
+            ExecEdge leftEdge,
+            ExecEdge rightEdge,
+            RowType outputType,
+            String description) {
+        super(Lists.newArrayList(leftEdge, rightEdge), outputType, 
description);
+        this.joinSpec = joinSpec;
+        this.isTemporalFunctionJoin = isTemporalTableFunctionJoin;

Review comment:
       the nonEquiConditions  in join spec here excludes  TEMPORAL_JOIN_FUNCTION




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to