[PR] [FLINK-33860] Implement restore tests for WindowTableFunction node [flink]
bvarghese1 opened a new pull request, #23936: URL: https://github.com/apache/flink/pull/23936 ## What is the purpose of the change *Add restore tests for WindowTableFunction node* ## Verifying this change This change added tests and can be verified as follows: - Added restore tests for WindowTableFunction node which verifies the generated compiled plan with the saved compiled plan ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (no) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no) - The serializers: (no) - The runtime per-record code paths (performance sensitive): (no) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no) - The S3 file system connector: (no) ## Documentation - Does this pull request introduce a new feature? (no) - If yes, how is the feature documented? (not applicable) -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [FLINK-33860] Implement restore tests for WindowTableFunction node [flink]
bvarghese1 commented on code in PR #23936: URL: https://github.com/apache/flink/pull/23936#discussion_r1428498126 ## flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/WindowTableFunctionJsonPlanTest.java: ## @@ -1,210 +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.planner.utils.StreamTableTestUtil; -import org.apache.flink.table.planner.utils.TableTestBase; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -/** Test json serialization/deserialization for window table function. */ -class WindowTableFunctionJsonPlanTest extends TableTestBase { - -private StreamTableTestUtil util; -private TableEnvironment tEnv; - -@BeforeEach -void setup() { -util = streamTestUtil(TableConfig.getDefault()); -tEnv = util.getTableEnv(); - -String srcTable1Ddl = -"CREATE TABLE MyTable (\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR,\n" -+ " `rowtime` AS TO_TIMESTAMP(c),\n" -+ " proctime as PROCTIME(),\n" -+ " WATERMARK for `rowtime` AS `rowtime` - INTERVAL '1' SECOND\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(srcTable1Ddl); - -String srcTable2Ddl = -"CREATE TABLE MyTable2 (\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR,\n" -+ " `rowtime` AS TO_TIMESTAMP(c),\n" -+ " proctime as PROCTIME(),\n" -+ " WATERMARK for `rowtime` AS `rowtime` - INTERVAL '1' SECOND\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(srcTable2Ddl); -} - -@Test -void testIndividualWindowTVF() { -String sinkTableDdl = -"CREATE TABLE MySink (\n" -+ " window_start TIMESTAMP(3),\n" -+ " window_end TIMESTAMP(3),\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(sinkTableDdl); -util.verifyJsonPlan( -"insert into MySink select\n" -+ " window_start,\n" -+ " window_end,\n" -+ " a,\n" -+ " b,\n" -+ " c\n" -+ "FROM TABLE(TUMBLE(TABLE MyTable, DESCRIPTOR(rowtime), INTERVAL '15' MINUTE))"); -} - -@Test -void testIndividualWindowTVFProcessingTime() { -String sinkTableDdl = -"CREATE TABLE MySink (\n" -+ " window_start TIMESTAMP(3),\n" -+ " window_end TIMESTAMP(3),\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(sinkTableDdl); -util.verifyJsonPlan( -"insert into MySink select\n" -+ " window_start,\n" -+ " window_end,\n" -+ " a,\n" -+ " b,\n" -+ " c\n" -+ "FROM TABLE(TUMBLE(TABLE MyTable, DESCRIPTOR(proctime), INTERVAL '15' MINUTE))"); -} - -@Test -void testFollowedByWindowJoin() { Review Comment: This test is covered as part of the WindowJoin restore tests -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub a
Re: [PR] [FLINK-33860] Implement restore tests for WindowTableFunction node [flink]
bvarghese1 commented on code in PR #23936: URL: https://github.com/apache/flink/pull/23936#discussion_r1428498415 ## flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/WindowTableFunctionJsonPlanTest.java: ## @@ -1,210 +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.planner.utils.StreamTableTestUtil; -import org.apache.flink.table.planner.utils.TableTestBase; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -/** Test json serialization/deserialization for window table function. */ -class WindowTableFunctionJsonPlanTest extends TableTestBase { - -private StreamTableTestUtil util; -private TableEnvironment tEnv; - -@BeforeEach -void setup() { -util = streamTestUtil(TableConfig.getDefault()); -tEnv = util.getTableEnv(); - -String srcTable1Ddl = -"CREATE TABLE MyTable (\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR,\n" -+ " `rowtime` AS TO_TIMESTAMP(c),\n" -+ " proctime as PROCTIME(),\n" -+ " WATERMARK for `rowtime` AS `rowtime` - INTERVAL '1' SECOND\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(srcTable1Ddl); - -String srcTable2Ddl = -"CREATE TABLE MyTable2 (\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR,\n" -+ " `rowtime` AS TO_TIMESTAMP(c),\n" -+ " proctime as PROCTIME(),\n" -+ " WATERMARK for `rowtime` AS `rowtime` - INTERVAL '1' SECOND\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(srcTable2Ddl); -} - -@Test -void testIndividualWindowTVF() { -String sinkTableDdl = -"CREATE TABLE MySink (\n" -+ " window_start TIMESTAMP(3),\n" -+ " window_end TIMESTAMP(3),\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(sinkTableDdl); -util.verifyJsonPlan( -"insert into MySink select\n" -+ " window_start,\n" -+ " window_end,\n" -+ " a,\n" -+ " b,\n" -+ " c\n" -+ "FROM TABLE(TUMBLE(TABLE MyTable, DESCRIPTOR(rowtime), INTERVAL '15' MINUTE))"); -} - -@Test -void testIndividualWindowTVFProcessingTime() { -String sinkTableDdl = -"CREATE TABLE MySink (\n" -+ " window_start TIMESTAMP(3),\n" -+ " window_end TIMESTAMP(3),\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(sinkTableDdl); -util.verifyJsonPlan( -"insert into MySink select\n" -+ " window_start,\n" -+ " window_end,\n" -+ " a,\n" -+ " b,\n" -+ " c\n" -+ "FROM TABLE(TUMBLE(TABLE MyTable, DESCRIPTOR(proctime), INTERVAL '15' MINUTE))"); -} - -@Test -void testFollowedByWindowJoin() { -String sinkTableDdl = -"CREATE TABLE MySink (\n" -+ " window_start TIMESTAMP(3) NOT NULL,\n" -+ " window_end TIMESTAMP(3) NOT
Re: [PR] [FLINK-33860] Implement restore tests for WindowTableFunction node [flink]
bvarghese1 commented on code in PR #23936: URL: https://github.com/apache/flink/pull/23936#discussion_r1428498672 ## flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/WindowTableFunctionJsonPlanTest.java: ## @@ -1,210 +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.planner.utils.StreamTableTestUtil; -import org.apache.flink.table.planner.utils.TableTestBase; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -/** Test json serialization/deserialization for window table function. */ -class WindowTableFunctionJsonPlanTest extends TableTestBase { - -private StreamTableTestUtil util; -private TableEnvironment tEnv; - -@BeforeEach -void setup() { -util = streamTestUtil(TableConfig.getDefault()); -tEnv = util.getTableEnv(); - -String srcTable1Ddl = -"CREATE TABLE MyTable (\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR,\n" -+ " `rowtime` AS TO_TIMESTAMP(c),\n" -+ " proctime as PROCTIME(),\n" -+ " WATERMARK for `rowtime` AS `rowtime` - INTERVAL '1' SECOND\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(srcTable1Ddl); - -String srcTable2Ddl = -"CREATE TABLE MyTable2 (\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR,\n" -+ " `rowtime` AS TO_TIMESTAMP(c),\n" -+ " proctime as PROCTIME(),\n" -+ " WATERMARK for `rowtime` AS `rowtime` - INTERVAL '1' SECOND\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(srcTable2Ddl); -} - -@Test -void testIndividualWindowTVF() { -String sinkTableDdl = -"CREATE TABLE MySink (\n" -+ " window_start TIMESTAMP(3),\n" -+ " window_end TIMESTAMP(3),\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(sinkTableDdl); -util.verifyJsonPlan( -"insert into MySink select\n" -+ " window_start,\n" -+ " window_end,\n" -+ " a,\n" -+ " b,\n" -+ " c\n" -+ "FROM TABLE(TUMBLE(TABLE MyTable, DESCRIPTOR(rowtime), INTERVAL '15' MINUTE))"); -} - -@Test -void testIndividualWindowTVFProcessingTime() { -String sinkTableDdl = -"CREATE TABLE MySink (\n" -+ " window_start TIMESTAMP(3),\n" -+ " window_end TIMESTAMP(3),\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(sinkTableDdl); -util.verifyJsonPlan( -"insert into MySink select\n" -+ " window_start,\n" -+ " window_end,\n" -+ " a,\n" -+ " b,\n" -+ " c\n" -+ "FROM TABLE(TUMBLE(TABLE MyTable, DESCRIPTOR(proctime), INTERVAL '15' MINUTE))"); -} - -@Test -void testFollowedByWindowJoin() { -String sinkTableDdl = -"CREATE TABLE MySink (\n" -+ " window_start TIMESTAMP(3) NOT NULL,\n" -+ " window_end TIMESTAMP(3) NOT
Re: [PR] [FLINK-33860] Implement restore tests for WindowTableFunction node [flink]
bvarghese1 commented on code in PR #23936: URL: https://github.com/apache/flink/pull/23936#discussion_r1428498672 ## flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/WindowTableFunctionJsonPlanTest.java: ## @@ -1,210 +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.planner.utils.StreamTableTestUtil; -import org.apache.flink.table.planner.utils.TableTestBase; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -/** Test json serialization/deserialization for window table function. */ -class WindowTableFunctionJsonPlanTest extends TableTestBase { - -private StreamTableTestUtil util; -private TableEnvironment tEnv; - -@BeforeEach -void setup() { -util = streamTestUtil(TableConfig.getDefault()); -tEnv = util.getTableEnv(); - -String srcTable1Ddl = -"CREATE TABLE MyTable (\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR,\n" -+ " `rowtime` AS TO_TIMESTAMP(c),\n" -+ " proctime as PROCTIME(),\n" -+ " WATERMARK for `rowtime` AS `rowtime` - INTERVAL '1' SECOND\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(srcTable1Ddl); - -String srcTable2Ddl = -"CREATE TABLE MyTable2 (\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR,\n" -+ " `rowtime` AS TO_TIMESTAMP(c),\n" -+ " proctime as PROCTIME(),\n" -+ " WATERMARK for `rowtime` AS `rowtime` - INTERVAL '1' SECOND\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(srcTable2Ddl); -} - -@Test -void testIndividualWindowTVF() { -String sinkTableDdl = -"CREATE TABLE MySink (\n" -+ " window_start TIMESTAMP(3),\n" -+ " window_end TIMESTAMP(3),\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(sinkTableDdl); -util.verifyJsonPlan( -"insert into MySink select\n" -+ " window_start,\n" -+ " window_end,\n" -+ " a,\n" -+ " b,\n" -+ " c\n" -+ "FROM TABLE(TUMBLE(TABLE MyTable, DESCRIPTOR(rowtime), INTERVAL '15' MINUTE))"); -} - -@Test -void testIndividualWindowTVFProcessingTime() { -String sinkTableDdl = -"CREATE TABLE MySink (\n" -+ " window_start TIMESTAMP(3),\n" -+ " window_end TIMESTAMP(3),\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(sinkTableDdl); -util.verifyJsonPlan( -"insert into MySink select\n" -+ " window_start,\n" -+ " window_end,\n" -+ " a,\n" -+ " b,\n" -+ " c\n" -+ "FROM TABLE(TUMBLE(TABLE MyTable, DESCRIPTOR(proctime), INTERVAL '15' MINUTE))"); -} - -@Test -void testFollowedByWindowJoin() { -String sinkTableDdl = -"CREATE TABLE MySink (\n" -+ " window_start TIMESTAMP(3) NOT NULL,\n" -+ " window_end TIMESTAMP(3) NOT
Re: [PR] [FLINK-33860] Implement restore tests for WindowTableFunction node [flink]
bvarghese1 commented on code in PR #23936: URL: https://github.com/apache/flink/pull/23936#discussion_r1428498126 ## flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/WindowTableFunctionJsonPlanTest.java: ## @@ -1,210 +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.planner.utils.StreamTableTestUtil; -import org.apache.flink.table.planner.utils.TableTestBase; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -/** Test json serialization/deserialization for window table function. */ -class WindowTableFunctionJsonPlanTest extends TableTestBase { - -private StreamTableTestUtil util; -private TableEnvironment tEnv; - -@BeforeEach -void setup() { -util = streamTestUtil(TableConfig.getDefault()); -tEnv = util.getTableEnv(); - -String srcTable1Ddl = -"CREATE TABLE MyTable (\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR,\n" -+ " `rowtime` AS TO_TIMESTAMP(c),\n" -+ " proctime as PROCTIME(),\n" -+ " WATERMARK for `rowtime` AS `rowtime` - INTERVAL '1' SECOND\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(srcTable1Ddl); - -String srcTable2Ddl = -"CREATE TABLE MyTable2 (\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR,\n" -+ " `rowtime` AS TO_TIMESTAMP(c),\n" -+ " proctime as PROCTIME(),\n" -+ " WATERMARK for `rowtime` AS `rowtime` - INTERVAL '1' SECOND\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(srcTable2Ddl); -} - -@Test -void testIndividualWindowTVF() { -String sinkTableDdl = -"CREATE TABLE MySink (\n" -+ " window_start TIMESTAMP(3),\n" -+ " window_end TIMESTAMP(3),\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(sinkTableDdl); -util.verifyJsonPlan( -"insert into MySink select\n" -+ " window_start,\n" -+ " window_end,\n" -+ " a,\n" -+ " b,\n" -+ " c\n" -+ "FROM TABLE(TUMBLE(TABLE MyTable, DESCRIPTOR(rowtime), INTERVAL '15' MINUTE))"); -} - -@Test -void testIndividualWindowTVFProcessingTime() { -String sinkTableDdl = -"CREATE TABLE MySink (\n" -+ " window_start TIMESTAMP(3),\n" -+ " window_end TIMESTAMP(3),\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(sinkTableDdl); -util.verifyJsonPlan( -"insert into MySink select\n" -+ " window_start,\n" -+ " window_end,\n" -+ " a,\n" -+ " b,\n" -+ " c\n" -+ "FROM TABLE(TUMBLE(TABLE MyTable, DESCRIPTOR(proctime), INTERVAL '15' MINUTE))"); -} - -@Test -void testFollowedByWindowJoin() { Review Comment: This test is covered as part of the WindowJoin restore tests - https://github.com/apache/flink/pull/23918 -- This is an automated message from the Apache Git Service. To res
Re: [PR] [FLINK-33860] Implement restore tests for WindowTableFunction node [flink]
bvarghese1 commented on code in PR #23936: URL: https://github.com/apache/flink/pull/23936#discussion_r1428498415 ## flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/WindowTableFunctionJsonPlanTest.java: ## @@ -1,210 +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.planner.utils.StreamTableTestUtil; -import org.apache.flink.table.planner.utils.TableTestBase; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -/** Test json serialization/deserialization for window table function. */ -class WindowTableFunctionJsonPlanTest extends TableTestBase { - -private StreamTableTestUtil util; -private TableEnvironment tEnv; - -@BeforeEach -void setup() { -util = streamTestUtil(TableConfig.getDefault()); -tEnv = util.getTableEnv(); - -String srcTable1Ddl = -"CREATE TABLE MyTable (\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR,\n" -+ " `rowtime` AS TO_TIMESTAMP(c),\n" -+ " proctime as PROCTIME(),\n" -+ " WATERMARK for `rowtime` AS `rowtime` - INTERVAL '1' SECOND\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(srcTable1Ddl); - -String srcTable2Ddl = -"CREATE TABLE MyTable2 (\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR,\n" -+ " `rowtime` AS TO_TIMESTAMP(c),\n" -+ " proctime as PROCTIME(),\n" -+ " WATERMARK for `rowtime` AS `rowtime` - INTERVAL '1' SECOND\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(srcTable2Ddl); -} - -@Test -void testIndividualWindowTVF() { -String sinkTableDdl = -"CREATE TABLE MySink (\n" -+ " window_start TIMESTAMP(3),\n" -+ " window_end TIMESTAMP(3),\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(sinkTableDdl); -util.verifyJsonPlan( -"insert into MySink select\n" -+ " window_start,\n" -+ " window_end,\n" -+ " a,\n" -+ " b,\n" -+ " c\n" -+ "FROM TABLE(TUMBLE(TABLE MyTable, DESCRIPTOR(rowtime), INTERVAL '15' MINUTE))"); -} - -@Test -void testIndividualWindowTVFProcessingTime() { -String sinkTableDdl = -"CREATE TABLE MySink (\n" -+ " window_start TIMESTAMP(3),\n" -+ " window_end TIMESTAMP(3),\n" -+ " a INT,\n" -+ " b BIGINT,\n" -+ " c VARCHAR\n" -+ ") WITH (\n" -+ " 'connector' = 'values')\n"; -tEnv.executeSql(sinkTableDdl); -util.verifyJsonPlan( -"insert into MySink select\n" -+ " window_start,\n" -+ " window_end,\n" -+ " a,\n" -+ " b,\n" -+ " c\n" -+ "FROM TABLE(TUMBLE(TABLE MyTable, DESCRIPTOR(proctime), INTERVAL '15' MINUTE))"); -} - -@Test -void testFollowedByWindowJoin() { -String sinkTableDdl = -"CREATE TABLE MySink (\n" -+ " window_start TIMESTAMP(3) NOT NULL,\n" -+ " window_end TIMESTAMP(3) NOT
Re: [PR] [FLINK-33860] Implement restore tests for WindowTableFunction node [flink]
flinkbot commented on PR #23936: URL: https://github.com/apache/flink/pull/23936#issuecomment-1858509241 ## CI report: * 48235d00b884cb7fbd7704556b8f8014c4350e0a UNKNOWN Bot commands The @flinkbot bot supports the following commands: - `@flinkbot run azure` re-run the last Azure build -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [FLINK-33860] Implement restore tests for WindowTableFunction node [flink]
dawidwys commented on PR #23936: URL: https://github.com/apache/flink/pull/23936#issuecomment-1864442955 @flinkbot run azure -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [FLINK-33860] Implement restore tests for WindowTableFunction node [flink]
dawidwys merged PR #23936: URL: https://github.com/apache/flink/pull/23936 -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org