(flink) 02/02: [FLINK-34000] Remove IncrementalGroupAgg Json Plan & IT tests

2024-02-13 Thread dwysakowicz
This is an automated email from the ASF dual-hosted git repository.

dwysakowicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 5844092408d21023a738077d0922cc75f1e634d7
Author: bvarghese1 
AuthorDate: Fri Jan 19 09:11:28 2024 -0800

[FLINK-34000] Remove IncrementalGroupAgg Json Plan & IT tests

- These are covered by restore tests
---
 .../stream/IncrementalAggregateJsonPlanTest.java   | 106 
 .../IncrementalAggregateJsonPlanITCase.java|  78 ---
 .../testIncrementalAggregate.out   | 401 --
 ...lAggregateWithSumCountDistinctAndRetraction.out | 585 -
 4 files changed, 1170 deletions(-)

diff --git 
a/flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/IncrementalAggregateJsonPlanTest.java
 
b/flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/IncrementalAggregateJsonPlanTest.java
deleted file mode 100644
index 26dcc04f303..000
--- 
a/flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/IncrementalAggregateJsonPlanTest.java
+++ /dev/null
@@ -1,106 +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.nodes.exec.stream;
-
-import org.apache.flink.table.api.TableConfig;
-import org.apache.flink.table.api.TableEnvironment;
-import org.apache.flink.table.api.config.ExecutionConfigOptions;
-import org.apache.flink.table.api.config.OptimizerConfigOptions;
-import 
org.apache.flink.table.planner.plan.rules.physical.stream.IncrementalAggregateRule;
-import org.apache.flink.table.planner.utils.AggregatePhaseStrategy;
-import org.apache.flink.table.planner.utils.StreamTableTestUtil;
-import org.apache.flink.table.planner.utils.TableTestBase;
-
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import java.time.Duration;
-
-/** Test json serialization/deserialization for incremental aggregate. */
-class IncrementalAggregateJsonPlanTest extends TableTestBase {
-
-private StreamTableTestUtil util;
-private TableEnvironment tEnv;
-
-@BeforeEach
-void setup() {
-util = streamTestUtil(TableConfig.getDefault());
-tEnv = util.getTableEnv();
-tEnv.getConfig()
-.set(
-
OptimizerConfigOptions.TABLE_OPTIMIZER_AGG_PHASE_STRATEGY,
-AggregatePhaseStrategy.TWO_PHASE.name())
-
.set(OptimizerConfigOptions.TABLE_OPTIMIZER_DISTINCT_AGG_SPLIT_ENABLED, true)
-.set(ExecutionConfigOptions.TABLE_EXEC_MINIBATCH_ENABLED, true)
-.set(
-
ExecutionConfigOptions.TABLE_EXEC_MINIBATCH_ALLOW_LATENCY,
-Duration.ofSeconds(10))
-.set(ExecutionConfigOptions.TABLE_EXEC_MINIBATCH_SIZE, 5L)
-
.set(IncrementalAggregateRule.TABLE_OPTIMIZER_INCREMENTAL_AGG_ENABLED(), true);
-
-String srcTableDdl =
-"CREATE TABLE MyTable (\n"
-+ "  a bigint,\n"
-+ "  b int not null,\n"
-+ "  c varchar,\n"
-+ "  d bigint\n"
-+ ") with (\n"
-+ "  'connector' = 'values',\n"
-+ "  'bounded' = 'false')";
-tEnv.executeSql(srcTableDdl);
-}
-
-@Test
-void testIncrementalAggregate() {
-String sinkTableDdl =
-"CREATE TABLE MySink (\n"
-+ "  a bigint,\n"
-+ "  c bigint\n"
-+ ") with (\n"
-+ "  'connector' = 'values',\n"
-+ "  'sink-insert-only' = 'false',\n"
-+ "  'table-sink-class' = 'DEFAULT')";
-tEnv.executeSql(sinkTableDdl);
-util.verifyJsonPlan(
-"insert into MySink select a, "
-+ "count(distinct c) as c "
-+ "from MyTable group by a");
-}
-
-@Test
-void testIncrementalAggregateWithSum

(flink) 02/02: [FLINK-34000] Remove IncrementalGroupAgg Json Plan & IT tests

2024-01-08 Thread dwysakowicz
This is an automated email from the ASF dual-hosted git repository.

dwysakowicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 0df5ab5a3318d21e8be3ab9237900664e3741013
Author: bvarghese1 
AuthorDate: Thu Jan 4 20:07:47 2024 -0800

[FLINK-34000] Remove IncrementalGroupAgg Json Plan & IT tests

- These are covered by the restore tests
---
 .../stream/IncrementalAggregateJsonPlanTest.java   | 106 
 .../IncrementalAggregateJsonPlanITCase.java|  78 ---
 .../testIncrementalAggregate.out   | 401 --
 ...lAggregateWithSumCountDistinctAndRetraction.out | 585 -
 4 files changed, 1170 deletions(-)

diff --git 
a/flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/IncrementalAggregateJsonPlanTest.java
 
b/flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/IncrementalAggregateJsonPlanTest.java
deleted file mode 100644
index 26dcc04f303..000
--- 
a/flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/IncrementalAggregateJsonPlanTest.java
+++ /dev/null
@@ -1,106 +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.nodes.exec.stream;
-
-import org.apache.flink.table.api.TableConfig;
-import org.apache.flink.table.api.TableEnvironment;
-import org.apache.flink.table.api.config.ExecutionConfigOptions;
-import org.apache.flink.table.api.config.OptimizerConfigOptions;
-import 
org.apache.flink.table.planner.plan.rules.physical.stream.IncrementalAggregateRule;
-import org.apache.flink.table.planner.utils.AggregatePhaseStrategy;
-import org.apache.flink.table.planner.utils.StreamTableTestUtil;
-import org.apache.flink.table.planner.utils.TableTestBase;
-
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import java.time.Duration;
-
-/** Test json serialization/deserialization for incremental aggregate. */
-class IncrementalAggregateJsonPlanTest extends TableTestBase {
-
-private StreamTableTestUtil util;
-private TableEnvironment tEnv;
-
-@BeforeEach
-void setup() {
-util = streamTestUtil(TableConfig.getDefault());
-tEnv = util.getTableEnv();
-tEnv.getConfig()
-.set(
-
OptimizerConfigOptions.TABLE_OPTIMIZER_AGG_PHASE_STRATEGY,
-AggregatePhaseStrategy.TWO_PHASE.name())
-
.set(OptimizerConfigOptions.TABLE_OPTIMIZER_DISTINCT_AGG_SPLIT_ENABLED, true)
-.set(ExecutionConfigOptions.TABLE_EXEC_MINIBATCH_ENABLED, true)
-.set(
-
ExecutionConfigOptions.TABLE_EXEC_MINIBATCH_ALLOW_LATENCY,
-Duration.ofSeconds(10))
-.set(ExecutionConfigOptions.TABLE_EXEC_MINIBATCH_SIZE, 5L)
-
.set(IncrementalAggregateRule.TABLE_OPTIMIZER_INCREMENTAL_AGG_ENABLED(), true);
-
-String srcTableDdl =
-"CREATE TABLE MyTable (\n"
-+ "  a bigint,\n"
-+ "  b int not null,\n"
-+ "  c varchar,\n"
-+ "  d bigint\n"
-+ ") with (\n"
-+ "  'connector' = 'values',\n"
-+ "  'bounded' = 'false')";
-tEnv.executeSql(srcTableDdl);
-}
-
-@Test
-void testIncrementalAggregate() {
-String sinkTableDdl =
-"CREATE TABLE MySink (\n"
-+ "  a bigint,\n"
-+ "  c bigint\n"
-+ ") with (\n"
-+ "  'connector' = 'values',\n"
-+ "  'sink-insert-only' = 'false',\n"
-+ "  'table-sink-class' = 'DEFAULT')";
-tEnv.executeSql(sinkTableDdl);
-util.verifyJsonPlan(
-"insert into MySink select a, "
-+ "count(distinct c) as c "
-+ "from MyTable group by a");
-}
-
-@Test
-void testIncrementalAggregateWith