stevenzwu commented on PR #6614:
URL: https://github.com/apache/iceberg/pull/6614#issuecomment-1387599939

   BTW, this usage pattern of `TableLoader` also exists in `FlinkSink`.
   
   ```
       private <T> DataStreamSink<T> chainIcebergOperators() {
         Preconditions.checkArgument(
             inputCreator != null,
             "Please use forRowData() or forMapperOutputType() to initialize 
the input DataStream.");
         Preconditions.checkNotNull(tableLoader, "Table loader shouldn't be 
null");
   
         DataStream<RowData> rowDataInput = inputCreator.apply(uidPrefix);
   
         if (table == null) {
           tableLoader.open();
           try (TableLoader loader = tableLoader) {
             this.table = loader.loadTable();
           } catch (IOException e) {
             throw new UncheckedIOException(
                 "Failed to load iceberg table from table loader: " + 
tableLoader, e);
           }
         }
   ```


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to