You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/01/28 11:05:03 UTC

[GitHub] [flink] twalthr commented on a change in pull request #18439: [hotfix][table-planner][test] Test fromValues() watermark propagation

twalthr commented on a change in pull request #18439:
URL: https://github.com/apache/flink/pull/18439#discussion_r794399247



##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/factories/TableFactoryHarness.java
##########
@@ -201,12 +201,25 @@ public CatalogTable toCatalogTable() {
             return new HarnessCatalogTable(super.toCatalogTable(), source, sink);
         }
 
+        @Override
+        public TableDescriptor.Builder toBuilder() {
+            return new Builder(this).source(source).sink(sink);
+        }
+
         /** Builder for {@link HarnessTableDescriptor}. */
-        public static class Builder {
+        public static class Builder extends TableDescriptor.Builder {
             private @Nullable Schema schema;
             private @Nullable SourceBase source;
             private @Nullable SinkBase sink;
 
+            public Builder() {

Review comment:
       we can still mark this private or at least protected for now

##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/common/CommonExecSinkITCase.java
##########
@@ -426,6 +424,49 @@ public void testNullEnforcer() throws ExecutionException, InterruptedException {
         }
     }
 
+    @Test
+    public void testFromValuesWatermarkPropagation() throws Exception {
+        final StreamTableEnvironment tableEnv = StreamTableEnvironment.create(env);
+        final SharedReference<List<Long>> watermarks = sharedObjects.add(new ArrayList<>());
+        final TableDescriptor sinkDescriptor =
+                TableFactoryHarness.newBuilder()
+                        .schema(Schema.newBuilder().column("a", "INT").build())

Review comment:
       you can use an inline descriptor via `.executeInsert(TableDescriptor)` and safe defining the schema twice




-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org