godfreyhe commented on a change in pull request #17684:
URL: https://github.com/apache/flink/pull/17684#discussion_r775783419



##########
File path: 
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/stream/sql/WindowTableFunctionTest.scala
##########
@@ -86,6 +87,17 @@ class WindowTableFunctionTest extends TableTestBase {
     util.verifyRelPlan(sql)
   }
 
+  @Test
+  def testCumulateTVFProctime(): Unit = {
+    val sql =
+      """
+        |SELECT *
+        |FROM TABLE(
+        | CUMULATE(TABLE MyTable, DESCRIPTOR(proctime), INTERVAL '10' MINUTE, 
INTERVAL '1' HOUR))
+        |""".stripMargin
+    util.verifyExplain(sql)

Review comment:
       use `util.verifyExecPlan()`

##########
File path: 
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecWindowTableFunction.java
##########
@@ -48,20 +42,15 @@
 public class StreamExecWindowTableFunction extends 
CommonExecWindowTableFunction
         implements StreamExecNode<RowData> {
 
-    public static final String FIELD_NAME_EMIT_PER_RECORD = "emitPerRecord";
-
-    @JsonProperty(FIELD_NAME_EMIT_PER_RECORD)
-    private final Boolean emitPerRecord;
+    public static final String FIELD_NAME_WINDOWING = "windowing";

Review comment:
       use the parent class's `FIELD_NAME_WINDOWING` ?

##########
File path: 
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/physical/stream/SimplifyWindowTableFunctionRules.java
##########
@@ -1,348 +0,0 @@
-/*
- * 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.rules.physical.stream;
-
-import 
org.apache.flink.table.planner.plan.nodes.physical.stream.StreamPhysicalCalc;
-import 
org.apache.flink.table.planner.plan.nodes.physical.stream.StreamPhysicalExchange;
-import 
org.apache.flink.table.planner.plan.nodes.physical.stream.StreamPhysicalWindowDeduplicate;
-import 
org.apache.flink.table.planner.plan.nodes.physical.stream.StreamPhysicalWindowJoin;
-import 
org.apache.flink.table.planner.plan.nodes.physical.stream.StreamPhysicalWindowRank;
-import 
org.apache.flink.table.planner.plan.nodes.physical.stream.StreamPhysicalWindowTableFunction;
-
-import org.apache.calcite.plan.RelOptRule;
-import org.apache.calcite.plan.RelOptRuleCall;
-import org.apache.calcite.plan.RelOptRuleOperand;
-import org.apache.calcite.rel.RelNode;
-
-import java.util.Collections;
-import java.util.List;
-
-/**
- * Planner rule that tries to simplify emit behavior of {@link 
StreamPhysicalWindowTableFunction} to
- * emit per record instead of emit after watermark passed window end if time 
attribute is event-time
- * and followed by {@link StreamPhysicalWindowRank} or {@link 
StreamPhysicalWindowJoin}.
- */
-public interface SimplifyWindowTableFunctionRules {

Review comment:
       why no exec plans are change after this rule is deleted?

##########
File path: 
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/rules/physical/stream/StreamPhysicalWindowTableFunctionRule.scala
##########
@@ -58,8 +58,7 @@ class StreamPhysicalWindowTableFunctionRule  extends 
ConverterRule(
       traitSet,
       newInput,
       scan.getRowType,
-      convertToWindowingStrategy(windowTableFunction, inputRowType),
-      false
+      convertToWindowingStrategy(scan.getCall.asInstanceOf[RexCall], 
newInput.getRowType)

Review comment:
       revert the change ?




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