@@ -6,14 +6,13 @@ use std::sync::Arc;
66use crate :: action_reconciliation:: calculate_transaction_expiration_timestamp;
77use crate :: actions:: domain_metadata:: domain_metadata_configuration;
88use crate :: actions:: set_transaction:: SetTransactionScanner ;
9- use crate :: actions:: { Metadata , Protocol , INTERNAL_DOMAIN_PREFIX } ;
9+ use crate :: actions:: INTERNAL_DOMAIN_PREFIX ;
1010use crate :: checkpoint:: CheckpointWriter ;
1111use crate :: listed_log_files:: ListedLogFiles ;
1212use crate :: log_segment:: LogSegment ;
1313use crate :: scan:: ScanBuilder ;
1414use crate :: schema:: SchemaRef ;
1515use crate :: table_configuration:: TableConfiguration ;
16- use crate :: table_features:: ColumnMappingMode ;
1716use crate :: table_properties:: TableProperties ;
1817use crate :: transaction:: Transaction ;
1918use crate :: LogCompactionWriter ;
@@ -50,7 +49,7 @@ impl std::fmt::Debug for Snapshot {
5049 f. debug_struct ( "Snapshot" )
5150 . field ( "path" , & self . log_segment . log_root . as_str ( ) )
5251 . field ( "version" , & self . version ( ) )
53- . field ( "metadata" , & self . metadata ( ) )
52+ . field ( "metadata" , & self . table_configuration ( ) . metadata ( ) )
5453 . finish ( )
5554 }
5655}
@@ -311,19 +310,6 @@ impl Snapshot {
311310 self . table_configuration . schema ( )
312311 }
313312
314- /// Table [`Metadata`] at this `Snapshot`s version.
315- #[ internal_api]
316- pub ( crate ) fn metadata ( & self ) -> & Metadata {
317- self . table_configuration . metadata ( )
318- }
319-
320- /// Table [`Protocol`] at this `Snapshot`s version.
321- #[ allow( dead_code) ]
322- #[ internal_api]
323- pub ( crate ) fn protocol ( & self ) -> & Protocol {
324- self . table_configuration . protocol ( )
325- }
326-
327313 /// Get the [`TableProperties`] for this [`Snapshot`].
328314 pub fn table_properties ( & self ) -> & TableProperties {
329315 self . table_configuration ( ) . table_properties ( )
@@ -335,13 +321,6 @@ impl Snapshot {
335321 & self . table_configuration
336322 }
337323
338- /// Get the [column mapping
339- /// mode](https://github.com/delta-io/delta/blob/master/PROTOCOL.md#column-mapping) at this
340- /// `Snapshot`s version.
341- pub fn column_mapping_mode ( & self ) -> ColumnMappingMode {
342- self . table_configuration . column_mapping_mode ( )
343- }
344-
345324 /// Create a [`ScanBuilder`] for an `SnapshotRef`.
346325 pub fn scan_builder ( self : Arc < Self > ) -> ScanBuilder {
347326 ScanBuilder :: new ( self )
@@ -408,6 +387,7 @@ mod tests {
408387 use crate :: arrow:: record_batch:: RecordBatch ;
409388 use crate :: parquet:: arrow:: ArrowWriter ;
410389
390+ use crate :: actions:: Protocol ;
411391 use crate :: engine:: arrow_data:: ArrowEngineData ;
412392 use crate :: engine:: default:: executor:: tokio:: TokioBackgroundExecutor ;
413393 use crate :: engine:: default:: filesystem:: ObjectStoreStorageHandler ;
@@ -432,7 +412,7 @@ mod tests {
432412
433413 let expected =
434414 Protocol :: try_new ( 3 , 7 , Some ( [ "deletionVectors" ] ) , Some ( [ "deletionVectors" ] ) ) . unwrap ( ) ;
435- assert_eq ! ( snapshot. protocol( ) , & expected) ;
415+ assert_eq ! ( snapshot. table_configuration ( ) . protocol( ) , & expected) ;
436416
437417 let schema_string = r#"{"type":"struct","fields":[{"name":"value","type":"integer","nullable":true,"metadata":{}}]}"# ;
438418 let expected: SchemaRef = serde_json:: from_str ( schema_string) . unwrap ( ) ;
@@ -450,7 +430,7 @@ mod tests {
450430
451431 let expected =
452432 Protocol :: try_new ( 3 , 7 , Some ( [ "deletionVectors" ] ) , Some ( [ "deletionVectors" ] ) ) . unwrap ( ) ;
453- assert_eq ! ( snapshot. protocol( ) , & expected) ;
433+ assert_eq ! ( snapshot. table_configuration ( ) . protocol( ) , & expected) ;
454434
455435 let schema_string = r#"{"type":"struct","fields":[{"name":"value","type":"integer","nullable":true,"metadata":{}}]}"# ;
456436 let expected: SchemaRef = serde_json:: from_str ( schema_string) . unwrap ( ) ;
0 commit comments