This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 59c4ca7d1b7 [FLINK-39993][docs] Correct documentation examples for 
ProcessTableFunctionTestHarness (#28543)
59c4ca7d1b7 is described below

commit 59c4ca7d1b75a5e59d12dbb2b8cc5992488f9510
Author: Mika Naylor <[email protected]>
AuthorDate: Thu Jun 25 14:21:17 2026 +0200

    [FLINK-39993][docs] Correct documentation examples for 
ProcessTableFunctionTestHarness (#28543)
---
 docs/content.zh/docs/dev/table/functions/ptfs.md | 14 +++++++-------
 docs/content/docs/dev/table/functions/ptfs.md    | 14 +++++++-------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/docs/content.zh/docs/dev/table/functions/ptfs.md 
b/docs/content.zh/docs/dev/table/functions/ptfs.md
index bf24d7ced06..bcfca27765c 100644
--- a/docs/content.zh/docs/dev/table/functions/ptfs.md
+++ b/docs/content.zh/docs/dev/table/functions/ptfs.md
@@ -2112,7 +2112,7 @@ public class PassthroughPTF extends 
ProcessTableFunction<Integer> {
 
 @Test
 void testPassthrough() throws Exception {
-  try (ProcessTableFunctionTestHarness<Row> harness =
+  try (ProcessTableFunctionTestHarness<Integer> harness =
     ProcessTableFunctionTestHarness.ofClass(PassthroughPTF.class)
     .withTableArgument("input", DataTypes.of("ROW<value INT>"))
     .build()) {
@@ -2120,7 +2120,7 @@ void testPassthrough() throws Exception {
     harness.processElement(Row.of(42));
     harness.processElement(Row.of(100));
 
-    List<Row> output = harness.getOutput();
+    List<Integer> output = harness.getOutput();
     assertThat(output).containsExactly(42, 100);
   }
 }
@@ -2199,8 +2199,8 @@ void testMultiTable() throws Exception {
     harness.processElementForTable("right", Row.of(1, "Berlin"));
 
     List<Row> output = harness.getOutput();
-    assertThat(output.get(0)).isEqualTo(Row.of(1, null, "LEFT: +I[1, Alice]"));
-    assertThat(output.get(1)).isEqualTo(Row.of(null, 1, "RIGHT: +I[1, 
Berlin]"));
+    assertThat(output.get(0)).isEqualTo(Row.of(1, 1, "LEFT: +I[1, Alice]"));
+    assertThat(output.get(1)).isEqualTo(Row.of(1, 1, "RIGHT: +I[1, Berlin]"));
   }
 }
 ```
@@ -2536,7 +2536,7 @@ void testBuilderType() throws Exception {
     .build()) {
 
     harness.processElement(Row.of(5));
-    assertThat(harness.getOutput()).containsExactly(Row.of(10));
+    assertThat(harness.getOutput()).containsExactly(Row.of(10, 5));
   }
 }
 ```
@@ -2564,10 +2564,10 @@ public class CustomerPTF extends 
ProcessTableFunction<Customer> {
 void testPOJO() throws Exception {
   try (ProcessTableFunctionTestHarness<Customer> harness =
       ProcessTableFunctionTestHarness.ofClass(CustomerPTF.class)
-          .withTableArgument("input", DataTypes.of(Customer.class))
+          .withTableArgument("c", DataTypes.of(Customer.class))
           .build()) {
 
-    harness.processElement(Row.of("Alice", 30));
+    harness.processElement(Row.of(30, "Alice"));
 
     List<Customer> output = harness.getOutput();
     assertThat(output.get(0).name).isEqualTo("Alice");
diff --git a/docs/content/docs/dev/table/functions/ptfs.md 
b/docs/content/docs/dev/table/functions/ptfs.md
index 2abf34fd066..f7a0fade0d7 100644
--- a/docs/content/docs/dev/table/functions/ptfs.md
+++ b/docs/content/docs/dev/table/functions/ptfs.md
@@ -2115,7 +2115,7 @@ public class PassthroughPTF extends 
ProcessTableFunction<Integer> {
 
 @Test
 void testPassthrough() throws Exception {
-  try (ProcessTableFunctionTestHarness<Row> harness =
+  try (ProcessTableFunctionTestHarness<Integer> harness =
     ProcessTableFunctionTestHarness.ofClass(PassthroughPTF.class)
     .withTableArgument("input", DataTypes.of("ROW<value INT>"))
     .build()) {
@@ -2123,7 +2123,7 @@ void testPassthrough() throws Exception {
     harness.processElement(Row.of(42));
     harness.processElement(Row.of(100));
 
-    List<Row> output = harness.getOutput();
+    List<Integer> output = harness.getOutput();
     assertThat(output).containsExactly(42, 100);
   }
 }
@@ -2202,8 +2202,8 @@ void testMultiTable() throws Exception {
     harness.processElementForTable("right", Row.of(1, "Berlin"));
 
     List<Row> output = harness.getOutput();
-    assertThat(output.get(0)).isEqualTo(Row.of(1, null, "LEFT: +I[1, Alice]"));
-    assertThat(output.get(1)).isEqualTo(Row.of(null, 1, "RIGHT: +I[1, 
Berlin]"));
+    assertThat(output.get(0)).isEqualTo(Row.of(1, 1, "LEFT: +I[1, Alice]"));
+    assertThat(output.get(1)).isEqualTo(Row.of(1, 1, "RIGHT: +I[1, Berlin]"));
   }
 }
 ```
@@ -2539,7 +2539,7 @@ void testBuilderType() throws Exception {
     .build()) {
 
     harness.processElement(Row.of(5));
-    assertThat(harness.getOutput()).containsExactly(Row.of(10));
+    assertThat(harness.getOutput()).containsExactly(Row.of(10, 5));
   }
 }
 ```
@@ -2567,10 +2567,10 @@ public class CustomerPTF extends 
ProcessTableFunction<Customer> {
 void testPOJO() throws Exception {
   try (ProcessTableFunctionTestHarness<Customer> harness =
       ProcessTableFunctionTestHarness.ofClass(CustomerPTF.class)
-          .withTableArgument("input", DataTypes.of(Customer.class))
+          .withTableArgument("c", DataTypes.of(Customer.class))
           .build()) {
 
-    harness.processElement(Row.of("Alice", 30));
+    harness.processElement(Row.of(30, "Alice"));
 
     List<Customer> output = harness.getOutput();
     assertThat(output.get(0).name).isEqualTo("Alice");

Reply via email to