fhueske commented on code in PR #29018:
URL: https://github.com/apache/flink/pull/29018#discussion_r3923466607


##########
docs/content.zh/docs/dev/table/functions/ptfs.md:
##########
@@ -2077,7 +2078,10 @@ public class DoublePTF extends ProcessTableFunction<Row> 
{
 void testDoublePTF() throws Exception {
   try (ProcessTableFunctionTestHarness<Row> harness =
     ProcessTableFunctionTestHarness.ofClass(DoublePTF.class)
-    .withTableArgument("input", DataTypes.of("ROW<value INT>"))
+    .withTableArgument(
+        TableArgument.forArgument("input")

Review Comment:
   nit
   `TableArgument.forArgument()` reads a bit repetitive. What do you think 
about this:
   
   ```suggestion
           TableArgument.name("input")
   ```
   or `forName()`?
   



##########
flink-table/flink-table-test-utils/src/main/java/org/apache/flink/table/runtime/functions/ProcessTableFunctionTestHarness.java:
##########
@@ -1035,6 +1038,72 @@ private static DataType toRowDataType(StructuredType 
structuredType) {
                 new RowType(structuredType.isNullable(), rowFields));
     }
 
+    /**
+     * Configuration for a single named table argument.
+     *
+     * @see 
ProcessTableFunctionTestHarness.Builder#withTableArgument(TableArgument)
+     */
+    @PublicEvolving
+    public static final class TableArgument {
+        private final String name;
+        @Nullable private final AbstractDataType<?> type;
+        @Nullable private final String[] partitionColumns;
+
+        private TableArgument(Builder builder) {
+            this.name = builder.name;
+            this.type = builder.type;
+            this.partitionColumns = builder.partitionColumns;
+        }
+
+        public static Builder forArgument(String argumentName) {

Review Comment:
   ```suggestion
           public static Builder forName(String argumentName) {
   ```
   or 
   ```suggestion
           public static Builder name(String argumentName) {
   ```
   ?



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