VasShabu commented on code in PR #29365:
URL: https://github.com/apache/flink/pull/29365#discussion_r4313367112


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/DeduplicateKeepFirstTestPrograms.java:
##########
@@ -0,0 +1,560 @@
+/*
+ * 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.ValidationException;
+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 org.apache.flink.types.RowKind;
+
+import java.time.Duration;
+import java.time.Instant;
+
+import static org.apache.flink.table.api.Expressions.$;
+import static org.apache.flink.table.api.Expressions.lit;
+
+/** {@link TableTestProgram} definitions for testing the built-in 
DEDUPLICATE_KEEP_FIRST PTF. */
+public class DeduplicateKeepFirstTestPrograms {
+
+    private static final String[] USER_EVENTS_SCHEMA = {"user_name STRING", 
"action STRING"};
+
+    private static final String[] TIMED_EVENTS_SCHEMA = {
+        "user_name STRING",
+        "action STRING",
+        "ts TIMESTAMP_LTZ(3)",
+        "WATERMARK FOR ts AS ts - INTERVAL '10' SECOND"
+    };
+
+    public static final TableTestProgram KEYED =
+            TableTestProgram.of(
+                            "deduplicate-keep-first-keyed",
+                            "only the first row per PARTITION BY key is 
emitted")
+                    .setupTableSource(
+                            SourceTestStep.newBuilder("user_events")
+                                    .addSchema(USER_EVENTS_SCHEMA)
+                                    .producedValues(Row.of("Vas", "login"), 
Row.of("Vas", "click"))
+                                    .build())
+                    .setupTableSink(
+                            SinkTestStep.newBuilder("sink")
+                                    .addSchema(USER_EVENTS_SCHEMA)
+                                    .consumedValues(Row.ofKind(RowKind.INSERT, 
"Vas", "login"))
+                                    .build())
+                    .runSql(
+                            "INSERT INTO sink SELECT * FROM 
DEDUPLICATE_KEEP_FIRST("
+                                    + "input => TABLE user_events PARTITION BY 
user_name)")
+                    .build();
+
+    public static final TableTestProgram TABLE_API =

Review Comment:
   sounds good, dropped



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