snuyanzin commented on code in PR #28065:
URL: https://github.com/apache/flink/pull/28065#discussion_r3160726279


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamPhysicalProcessTableFunction.java:
##########
@@ -419,17 +420,25 @@ public static RexCall toUdfCall(RexCall call) {
                                     }
                                     final RexTableArgCall tableArg = 
(RexTableArgCall) operand.e;
                                     final StaticArgument staticArg = 
staticArgs.get(0);
-                                    if 
(staticArg.is(StaticArgumentTrait.PASS_COLUMNS_THROUGH)) {
-                                        return 
tableArg.getType().getFieldCount();
-                                    } else {
-                                        return 
tableArg.getPartitionKeys().length;
+                                    switch (staticArg.getPassThroughMode()) {
+                                        case NONE:
+                                            return 0;
+                                        case ALL:
+                                            return 
tableArg.getType().getFieldCount();
+                                        default:
+                                            // KEY

Review Comment:
   can we have dedicated case for KEY?
   
   better to have it otherwise adding new mode will lead to painful debug



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