twalthr commented on code in PR #28975:
URL: https://github.com/apache/flink/pull/28975#discussion_r3784208293


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/ProcessTableFunctionTestUtils.java:
##########
@@ -1188,6 +1189,36 @@ public void eval(@ArgumentHint(ROW_SEMANTIC_TABLE) 
CastingPojo p, long b) {
         }
     }
 
+    /**
+     * Testing function whose table argument declares a non-default conversion 
class ({@link
+     * RowData}). The conversion class must be preserved so that {@code 
eval()} receives {@link
+     * RowData} instead of {@link Row}.
+     */
+    public static class RowDataRowSemanticTableFunction extends 
AppendProcessTableFunctionBase {
+        public TypeInference getTypeInference(DataTypeFactory typeFactory) {
+            return TypeInference.newBuilder()
+                    .staticArguments(
+                            StaticArgument.table(
+                                    "input",
+                                    RowData.class,
+                                    false,
+                                    
EnumSet.of(StaticArgumentTrait.ROW_SEMANTIC_TABLE)))
+                    .outputTypeStrategy(
+                            callContext ->
+                                    Optional.of(
+                                            DataTypes.ROW(
+                                                            DataTypes.FIELD(
+                                                                    "out",
+                                                                    
DataTypes.STRING().notNull()))
+                                                    .notNull()))
+                    .build();
+        }

Review Comment:
   we can drop this part entirely, only adding a 
`@ArgumentHint(ROW_SEMANTIC_TABLE)` should be suffient



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