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


##########
docs/content.zh/docs/dev/table/tableApi.md:
##########
@@ -1152,6 +1152,47 @@ val result = orders
 {{< /tab >}}
 {{< /tabs >}}
 
+#### Lateral Snapshot Join
+
+{{< label "Batch" >}} {{< label "Streaming" >}}
+
+Enriches an append-only table with the current state of an updating table by 
calling the built-in `SNAPSHOT` [process table function]({{< ref 
"docs/sql/functions/built-in-functions" >}}) as the build (right) side of a 
`LATERAL` join. Each probe-side row is joined with the build-side state that is 
current when the row is processed. Both inner and left outer joins are 
supported, and the predicate must contain at least one equality condition.
+
+See [LATERAL SNAPSHOT join]({{< ref "docs/sql/reference/queries/joins" 
>}}#lateral-snapshot-join) for the full list of `SNAPSHOT` arguments and the 
join semantics.
+
+{{< tabs "snapshotjoin" >}}
+{{< tab "Java" >}}
+```java
+Table orders = tableEnv.from("Orders");
+Table currencyRates = tableEnv.from("CurrencyRates");
+
+// inner join: enrich every order with the current conversion rate
+Table result = orders
+    .joinLateral(
+        call(
+            "SNAPSHOT",

Review Comment:
   Yes, I was thinking the same. Having a built-in primitive instead of a 
`call("SNAPSHOT", ...)` would be better, but the "manual" version is the 
minimum and should be supported as well



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