swapna267 commented on PR #18144:
URL: https://github.com/apache/iceberg/pull/18144#issuecomment-5706423530

   why not use ReadOptions and pass when creating the 
IcebergFullCachingLookupFunction, which will keep it consistent across task 
restarts or job restarts.
   
   At table creation time, 
     ```sql
     CREATE TABLE dim_users (
       user_id BIGINT,
       name STRING,
       city STRING
     ) WITH (
       'connector' = 'iceberg',
       'catalog-name' = 'iceberg_catalog',
       'catalog-type' = 'hadoop',
       'warehouse' = '/path/to/warehouse',
       'catalog-database' = 'db',
       'catalog-table' = 'users',
   
       'lookup.full-cache.eager-load' = 'true',
       'snapshot-id' = '121334'
     );
     ```
   
   OR per query
   
     ```sql
     SELECT o.order_id, o.user_id, u.name, u.city
     FROM orders AS o
     LEFT JOIN iceberg_catalog.`db`.`users`
     /*+ OPTIONS(
          'lookup.full-cache.eager-load' = 'true',
          'snapshot-id' = '121334'
        ) */
     FOR SYSTEM_TIME AS OF o.proc_time AS u
     ON o.user_id = u.user_id;
     ```
   
   
   There could be other strategies to simplify , instead of user specifying 
exact snapshot id also like latest or specific tag or as-of-timestamp 


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