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


##########
flink-table/flink-table-test-utils/src/test/java/org/apache/flink/table/runtime/functions/ProcessTableFunctionTestHarnessTest.java:
##########
@@ -2455,11 +2457,13 @@ void testPassThroughWithTimersIsRejected() throws 
Exception {
                         .withOnTimeColumn("ts")
                         .build()) {
 
-            assertThrows(
-                    TableRuntimeException.class,
-                    () ->
-                            harness.processElement(
-                                    Row.of("P1", LocalDateTime.of(2025, 1, 1, 
0, 0, 1))));
+            TableRuntimeException e =
+                    assertThrows(
+                            TableRuntimeException.class,
+                            () ->
+                                    harness.processElement(

Review Comment:
   I thought so too, but there's a complication in that live flink also doesnt 
reject these PTFs at plan time but during execution, when you try to call 
`registerOnTime()`. So you could write a PTF that wouldn't be rejected and 
would run fine by having an `onTimer` method but not actually call 
`registerOnTime()`. If we rejected it at harness build, we would unnecessarily 
reject these PTFs that otherwise would run normally (even though a PTF with an 
onTimer but with no timer registration is, admittedly, goofy)



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