Fokko commented on code in PR #259:
URL: https://github.com/apache/iceberg-rust/pull/259#discussion_r1525963167


##########
crates/iceberg/src/table.rs:
##########
@@ -63,3 +64,99 @@ impl Table {
         TableScanBuilder::new(self)
     }
 }
+
+/// `StaticTable` is a read-only table struct that can be created from a 
metadata file or from `TableMetaData` without a catalog.
+/// It can only be used to read metadata and for table scan.
+/// # Examples
+///
+/// ```rust, no_run
+/// # use iceberg::io::FileIO;
+/// # use iceberg::table::StaticTable;
+/// # use iceberg::TableIdent;
+/// # tokio_test::block_on(async {
+/// let metadata_file_location = "s3://bucket_name/path/to/metadata.json";
+/// let file_io = 
FileIO::from_path(&metadata_file_location).unwrap().build().unwrap();
+/// let static_identifier = TableIdent::from_strs(["static_ns", 
"static_table"]).unwrap();
+/// let static_table = 
StaticTable::from_metadata_file(&metadata_file_location, static_identifier, 
file_io).await.unwrap();
+/// let snapshot_id = static_table
+/// .metadata()
+/// .current_snapshot()
+/// .unwrap()
+/// .snapshot_id();
+/// # });
+/// ```
+pub struct StaticTable(Table);

Review Comment:
   It is also called StaticTable in Java: 
https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/StaticTableOperations.java



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