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


##########
flink-table/flink-table-test-utils/src/main/java/org/apache/flink/table/runtime/functions/ProcessTableFunctionTestHarness.java:
##########
@@ -618,21 +683,40 @@ public ProcessTableFunctionTestHarness<OUT> build() 
throws Exception {
             List<ArgumentInfo> arguments =
                     extractAndValidateTypeInference(function, 
systemTypeInference);
 
-            FunctionContext functionContext =
-                    new FunctionContext(null, 
Thread.currentThread().getContextClassLoader(), null);
+            FunctionContext functionContext = new FunctionContext(null, 
classLoader, null);
 
             Method evalMethod = findEvalMethod();
 
             validateEvalMethodSupported(evalMethod, arguments);
             validatePartitionConsistency(arguments);

Review Comment:
   Yep! We build up the TableSemantics with the partition column information 
from the `withPartitionBy` config in the builder, and pass it to the 
`SystemTypeInference` which will fail if the PTF has state but has no partition 
by (unless, I think, `OPTIONAL_PARTITION_BY` is marked on the PTF)



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