autophagy commented on code in PR #28657:
URL: https://github.com/apache/flink/pull/28657#discussion_r3585697667


##########
flink-table/flink-table-test-utils/src/main/java/org/apache/flink/table/runtime/functions/ProcessTableFunctionTestHarness.java:
##########
@@ -815,19 +857,23 @@ private Row extractPartitionKey(TableArgumentInfo 
tableArg, Row row) {
     private class HarnessCollector implements Collector<OUT> {
 
         @Override
+        @SuppressWarnings("unchecked")
         public void collect(OUT record) {
-            OUT finalRecord;
+            Row ptfRow = toPtfOutputRow(record);
 
+            functionOutput.add(outputIsRow ? (OUT) ptfRow : record);

Review Comment:
   Yeah this is true - but the captured row from the PTF could be a positional 
only row (like `Row.of(30, "hello")`) which is valid! But the PTF will declare 
a return type like `ROW<threshold INT, message STRING>` so a user'd probably 
expect a returned Row with the field names declared by the PTF return type. 
`ptfRow` is roundtripped through the converter, so it will have the column names



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