Guosmilesmile commented on code in PR #18144:
URL: https://github.com/apache/iceberg/pull/18144#discussion_r4071212231


##########
docs/docs/flink-queries.md:
##########
@@ -92,6 +92,34 @@ SELECT * FROM table /*+ OPTIONS('tag'='t1') */;
 SELECT * FROM table /*+ OPTIONS('streaming'='true', 'monitor-interval'='1s', 
'start-tag'='t1', 'end-tag'='t2') */;
 ```
 
+### Lookup Join
+
+Iceberg supports Flink lookup join, which enriches a stream with data from an 
Iceberg dimension table:
+
+```sql
+-- The OPTIONS hint used in this section requires dynamic table options, which 
are disabled by default.
+SET table.dynamic-table-options.enabled=true;
+
+SELECT o.order_id, o.user_id, u.name, u.city
+FROM orders AS o
+LEFT JOIN iceberg_catalog.db.user_dim
+  FOR SYSTEM_TIME AS OF o.proc_time AS u
+  ON o.user_id = u.user_id;
+```
+
+Iceberg implements lookup join with a full cache: the whole projected 
dimension table is loaded into the cache, and every lookup is served from it 
without falling back to the table. The full cache is held in memory on the 
TaskManager heap, so lookup join targets dimension tables that fit comfortably 
there.
+
+The cache is loaded by default when the lookup function is opened. Set 
lookup.full-cache.eager-load to false to load it on the first lookup instead, 
which blocks the data flow until the cache is fully loaded.
+
+There is no background refresh: the cache keeps the data it was loaded with 
for the lifetime of the job, so the dimension table should be populated before 
the join starts.
+
+The lookup options are:
+
+| Option                       | Default | Description                         
                                                                                
        |
+| ---------------------------- 
|---------|-----------------------------------------------------------------------------------------------------------------------------|
+| lookup.cache                 |         | Only `FULL` is accepted; `NONE` and 
`PARTIAL` are rejected, because an Iceberg table cannot be point-looked-up 
effectively. |

Review Comment:
   Ok, remove it. 



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to