twalthr commented on code in PR #25635: URL: https://github.com/apache/flink/pull/25635#discussion_r1842136272
########## flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/common/OverAggregateTestPrograms.java: ########## @@ -0,0 +1,433 @@ +/* + * 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.common; + +import org.apache.flink.table.planner.plan.nodes.exec.stream.StreamExecOverAggregate; +import org.apache.flink.table.planner.plan.utils.JavaUserDefinedAggFunctions; +import org.apache.flink.table.test.program.SinkTestStep; +import org.apache.flink.table.test.program.SourceTestStep; +import org.apache.flink.table.test.program.TableTestProgram; +import org.apache.flink.types.Row; + +import static org.apache.flink.table.api.config.TableConfigOptions.LOCAL_TIME_ZONE; + +/** {@link TableTestProgram} definitions for testing {@link StreamExecOverAggregate}. */ +public class OverAggregateTestPrograms { + + private static final Row[] DATA = { + Row.of(10L, 1L, 1, "Hello"), + Row.of(15L, 1L, 15, "Hello"), + Row.of(16L, 1L, 16, "Hello"), + Row.of(19L, 1L, 15, "Hello"), + Row.of(20L, 2L, 2, "Hello"), + Row.of(21L, 2L, 3, "Hello"), + Row.of(30L, 3L, 3, "Hello"), + Row.of(33L, 17L, 1, "Hello"), + Row.of(37L, 19L, 15, "Hello"), + Row.of(40L, 4L, 4, "Hello"), + Row.of(50L, 5L, 5, "Hello"), + Row.of(51L, 19L, 15, "Hello"), + Row.of(52L, 19L, 15, "Hello"), + Row.of(53L, 19L, 15, "Hello"), + Row.of(60L, 6L, 6, "Hello"), + Row.of(65L, 6L, 65, "Hello"), + Row.of(90L, 6L, 9, "Hello"), + Row.of(90L, 6L, 10, "Hello"), + Row.of(90L, 7L, 9, "Hello"), + Row.of(92L, 7L, 9, "Hello"), + Row.of(99L, 19L, 15, "Hello"), + Row.of(100L, 7L, 7, "Hello World"), + Row.of(110L, 7L, 17, "Hello World"), + Row.of(140L, 7L, 18, "Hello World"), + Row.of(150L, 8L, 8, "Hello World"), + Row.of(200L, 20L, 20, "Hello World") + }; + + private static final Row[] DATA_WITH_OUT_OF_ORDER_RECORDS = { + Row.of(10L, 1L, 1, "Hello"), + Row.of(15L, 1L, 15, "Hello"), + Row.of(16L, 1L, 16, "Hello"), + Row.of(20L, 2L, 2, "Hello"), + Row.of(20L, 2L, 2, "Hello"), + Row.of(20L, 2L, 3, "Hello"), + Row.of(30L, 3L, 3, "Hello"), + Row.of(40L, 4L, 4, "Hello"), + Row.of(50L, 5L, 5, "Hello"), + Row.of(60L, 6L, 6, "Hello"), + Row.of(65L, 6L, 65, "Hello"), + Row.of(51L, 19L, 15, "Hello"), // Late? Review Comment: Fine we can merge it. But it would be great if you can explain code that we have written. It doesn't make sense to let batch mode tests run on the same incorrect behavior. -- 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