fhueske commented on code in PR #28396:
URL: https://github.com/apache/flink/pull/28396#discussion_r3429467999


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/BuiltInFunctionDefinitions.java:
##########
@@ -908,6 +910,45 @@ ANY, and(logical(LogicalTypeRoot.BOOLEAN), LITERAL)
                             
"org.apache.flink.table.runtime.functions.ptf.FromChangelogFunction")
                     .build();
 
+    /**
+     * Built-in proxy function for the LATERAL SNAPSHOT temporal join.
+     *
+     * <p>The function itself has no runtime — it is a planner placeholder. A 
dedicated optimizer
+     * rule recognizes calls of this function inside a {@code LATERAL} context 
and rewrites the
+     * surrounding correlate/join into a specialized stream operator that 
joins probe-side records
+     * against an updating temporal build-side table.
+     */
+    public static final BuiltInFunctionDefinition SNAPSHOT =
+            BuiltInFunctionDefinition.newBuilder()
+                    .name("SNAPSHOT")
+                    .kind(PROCESS_TABLE)
+                    .staticArguments(
+                            StaticArgument.table(
+                                    "input",
+                                    Row.class,
+                                    false,
+                                    EnumSet.of(
+                                            StaticArgumentTrait.TABLE,
+                                            
StaticArgumentTrait.ROW_SEMANTIC_TABLE,
+                                            
StaticArgumentTrait.SUPPORT_UPDATES,
+                                            
StaticArgumentTrait.REQUIRE_UPDATE_BEFORE,
+                                            
StaticArgumentTrait.REQUIRE_FULL_DELETE)),
+                            StaticArgument.scalar(
+                                    "load_completed_condition", 
DataTypes.STRING(), true),
+                            StaticArgument.scalar(
+                                    "load_completed_time", 
DataTypes.TIMESTAMP(3), true),
+                            StaticArgument.scalar(
+                                    "load_completed_idle_timeout",
+                                    DataTypes.INTERVAL(DataTypes.SECOND()),
+                                    true),
+                            StaticArgument.scalar(

Review Comment:
   The problem is that `CallContextMock.isArgumentNull()` is not correctly 
implemented. It throws an OOBE when it should return `true`. Fixing this would 
require quite a bit of refactoring.
   
   I've created https://issues.apache.org/jira/browse/FLINK-39952 to track this 
issue.



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