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:
We can't add this check yet because `StreamPhysicalProcessTableFunction`
will throw if `disableSystemArguments(true)` is set.
So we have to wait until we've added a rule that prevents
`StreamPhysicalProcessTableFunction` to be created for `SNAPSHOT`.
--
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]