@@ -33,9 +33,8 @@ use uuid::Uuid;
33
33
use super :: snapshot:: SnapshotReference ;
34
34
pub use super :: table_metadata_builder:: { TableMetadataBuildResult , TableMetadataBuilder } ;
35
35
use super :: {
36
- PartitionSpecRef , PartitionStatisticsFile , SchemaId , SchemaRef , Snapshot , SnapshotRef ,
37
- SnapshotRetention , SortOrder , SortOrderRef , StatisticsFile , StructType ,
38
- DEFAULT_PARTITION_SPEC_ID ,
36
+ PartitionSpecRef , PartitionStatisticsFile , SchemaId , SchemaRef , SnapshotRef , SnapshotRetention ,
37
+ SortOrder , SortOrderRef , StatisticsFile , StructType , DEFAULT_PARTITION_SPEC_ID ,
39
38
} ;
40
39
use crate :: error:: { timestamp_ms_to_utc, Result } ;
41
40
use crate :: { Error , ErrorKind } ;
@@ -398,33 +397,6 @@ impl TableMetadata {
398
397
self . partition_statistics . get ( & snapshot_id)
399
398
}
400
399
401
- /// Append snapshot to table
402
- #[ deprecated(
403
- since = "0.4.0" ,
404
- note = "please use `TableMetadataBuilder.set_branch_snapshot` instead"
405
- ) ]
406
- pub fn append_snapshot ( & mut self , snapshot : Snapshot ) {
407
- self . last_updated_ms = snapshot. timestamp_ms ( ) ;
408
- self . last_sequence_number = snapshot. sequence_number ( ) ;
409
-
410
- self . refs
411
- . entry ( MAIN_BRANCH . to_string ( ) )
412
- . and_modify ( |s| {
413
- s. snapshot_id = snapshot. snapshot_id ( ) ;
414
- } )
415
- . or_insert_with ( || {
416
- SnapshotReference :: new ( snapshot. snapshot_id ( ) , SnapshotRetention :: Branch {
417
- min_snapshots_to_keep : None ,
418
- max_snapshot_age_ms : None ,
419
- max_ref_age_ms : None ,
420
- } )
421
- } ) ;
422
-
423
- self . snapshot_log . push ( snapshot. log ( ) ) ;
424
- self . snapshots
425
- . insert ( snapshot. snapshot_id ( ) , Arc :: new ( snapshot) ) ;
426
- }
427
-
428
400
fn construct_refs ( & mut self ) {
429
401
if let Some ( current_snapshot_id) = self . current_snapshot_id {
430
402
if !self . refs . contains_key ( MAIN_BRANCH ) {
0 commit comments