twalthr commented on a change in pull request #18108:
URL: https://github.com/apache/flink/pull/18108#discussion_r769414851



##########
File path: 
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecIntervalJoin.java
##########
@@ -44,12 +40,14 @@
 import org.apache.flink.table.runtime.keyselector.RowDataKeySelector;
 import 
org.apache.flink.table.runtime.operators.join.KeyedCoProcessOperatorWithWatermarkDelay;
 import org.apache.flink.table.runtime.operators.join.OuterJoinPaddingUtil;
+import org.apache.flink.table.runtime.operators.join.PaddingLeftMapFunction;
+import org.apache.flink.table.runtime.operators.join.PaddingRightMapFunction;
 import 
org.apache.flink.table.runtime.operators.join.interval.IntervalJoinFunction;
 import 
org.apache.flink.table.runtime.operators.join.interval.ProcTimeIntervalJoin;
 import 
org.apache.flink.table.runtime.operators.join.interval.RowTimeIntervalJoin;
+import org.apache.flink.table.runtime.operators.misc.FilterAllFlatMapFunction;

Review comment:
       I think we should group runtime classes by operator. Rather 
`org.apache.flink.table.runtime.operators.join.interval.`?

##########
File path: 
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/operators/join/PaddingLeftMapFunction.java
##########
@@ -0,0 +1,52 @@
+/*
+ * 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.runtime.operators.join;

Review comment:
       `org.apache.flink.table.runtime.operators.join.interval`

##########
File path: flink-table/flink-table-planner/pom.xml
##########
@@ -426,12 +422,14 @@ under the License.
                                                                        
<shadedPattern>org.apache.flink.calcite.shaded.com.google</shadedPattern>
                                                                </relocation>
                                                                <relocation>
+                                                                       <!-- 
Packaged in runtime -->
                                                                        
<pattern>com.jayway</pattern>
                                                                        
<shadedPattern>org.apache.flink.calcite.shaded.com.jayway</shadedPattern>
                                                                </relocation>
                                                                <relocation>
+                                                                       <!-- 
Packaged in runtime -->
                                                                        
<pattern>com.fasterxml</pattern>
-                                                                       
<shadedPattern>org.apache.flink.calcite.shaded.com.fasterxml</shadedPattern>
+                                                                       
<shadedPattern>org.apache.flink.shaded.tablejackson.com.fasterxml</shadedPattern>

Review comment:
       what happens if we use Flink's Jackson version?

##########
File path: 
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/generated/GeneratedWatermarkGeneratorSupplier.java
##########
@@ -0,0 +1,107 @@
+/*
+ * 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.runtime.generated;
+
+import org.apache.flink.api.common.eventtime.Watermark;
+import org.apache.flink.api.common.eventtime.WatermarkGeneratorSupplier;
+import org.apache.flink.api.common.eventtime.WatermarkOutput;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.table.data.RowData;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Wrapper of the {@link GeneratedWatermarkGenerator} that is used to create 
{@link
+ * org.apache.flink.api.common.eventtime.WatermarkGenerator}. The {@link
+ * GeneratedWatermarkGeneratorSupplier} uses the {@link Context} to init the 
generated watermark
+ * generator.
+ */
+public class GeneratedWatermarkGeneratorSupplier implements 
WatermarkGeneratorSupplier<RowData> {

Review comment:
       Please add `@Internal` annotations to all added classes of this PR.

##########
File path: 
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/GenerateUtils.scala
##########
@@ -448,14 +448,35 @@ object GenerateUtils {
     }
   }
 
-  def generateSymbol(enum: Enum[_]): GeneratedExpression = {
+  def generateSymbol(value: Enum[_]): GeneratedExpression = {
+    // Make sure to convert calcite enum types to flink types
+    val convertedValue = value match {
+      case tu: org.apache.calcite.avatica.util.TimeUnit =>

Review comment:
       let's create a symbol util in the planner module to have all these 
symbol mapping in a centralized place instead of hidden at various locations. 
we will also need a mapping from string to symbol for FLIP-190. what we need is:
   
   ```
   addSymbol(string value, table api enum value, calcite enum value, runtime 
enum value)
   ```

##########
File path: flink-table/flink-table-runtime/pom.xml
##########
@@ -84,6 +84,30 @@ under the License.
                        <version>${janino.version}</version>
                </dependency>
 
+               <!-- Jackson and JsonPath (used by calcite) -->

Review comment:
       ```
   <!-- Jackson and JsonPath (also required by Calcite and shared with the 
flink-table-planner module) -->
   ```




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to