@@ -52,66 +52,66 @@ pub type TableMetadataRef = Arc<TableMetadata>;
52
52
/// We check the validity of this data structure when constructing.
53
53
pub struct TableMetadata {
54
54
/// Integer Version for the format.
55
- format_version : FormatVersion ,
55
+ pub ( crate ) format_version : FormatVersion ,
56
56
/// A UUID that identifies the table
57
- table_uuid : Uuid ,
57
+ pub ( crate ) table_uuid : Uuid ,
58
58
/// Location tables base location
59
- location : String ,
59
+ pub ( crate ) location : String ,
60
60
/// The tables highest sequence number
61
- last_sequence_number : i64 ,
61
+ pub ( crate ) last_sequence_number : i64 ,
62
62
/// Timestamp in milliseconds from the unix epoch when the table was last updated.
63
- last_updated_ms : i64 ,
63
+ pub ( crate ) last_updated_ms : i64 ,
64
64
/// An integer; the highest assigned column ID for the table.
65
- last_column_id : i32 ,
65
+ pub ( crate ) last_column_id : i32 ,
66
66
/// A list of schemas, stored as objects with schema-id.
67
- schemas : HashMap < i32 , SchemaRef > ,
67
+ pub ( crate ) schemas : HashMap < i32 , SchemaRef > ,
68
68
/// ID of the table’s current schema.
69
- current_schema_id : i32 ,
69
+ pub ( crate ) current_schema_id : i32 ,
70
70
/// A list of partition specs, stored as full partition spec objects.
71
- partition_specs : HashMap < i32 , PartitionSpecRef > ,
71
+ pub ( crate ) partition_specs : HashMap < i32 , PartitionSpecRef > ,
72
72
/// ID of the “current” spec that writers should use by default.
73
- default_spec_id : i32 ,
73
+ pub ( crate ) default_spec_id : i32 ,
74
74
/// An integer; the highest assigned partition field ID across all partition specs for the table.
75
- last_partition_id : i32 ,
75
+ pub ( crate ) last_partition_id : i32 ,
76
76
///A string to string map of table properties. This is used to control settings that
77
77
/// affect reading and writing and is not intended to be used for arbitrary metadata.
78
78
/// For example, commit.retry.num-retries is used to control the number of commit retries.
79
- properties : HashMap < String , String > ,
79
+ pub ( crate ) properties : HashMap < String , String > ,
80
80
/// long ID of the current table snapshot; must be the same as the current
81
81
/// ID of the main branch in refs.
82
- current_snapshot_id : Option < i64 > ,
82
+ pub ( crate ) current_snapshot_id : Option < i64 > ,
83
83
///A list of valid snapshots. Valid snapshots are snapshots for which all
84
84
/// data files exist in the file system. A data file must not be deleted
85
85
/// from the file system until the last snapshot in which it was listed is
86
86
/// garbage collected.
87
- snapshots : HashMap < i64 , SnapshotRef > ,
87
+ pub ( crate ) snapshots : HashMap < i64 , SnapshotRef > ,
88
88
/// A list (optional) of timestamp and snapshot ID pairs that encodes changes
89
89
/// to the current snapshot for the table. Each time the current-snapshot-id
90
90
/// is changed, a new entry should be added with the last-updated-ms
91
91
/// and the new current-snapshot-id. When snapshots are expired from
92
92
/// the list of valid snapshots, all entries before a snapshot that has
93
93
/// expired should be removed.
94
- snapshot_log : Vec < SnapshotLog > ,
94
+ pub ( crate ) snapshot_log : Vec < SnapshotLog > ,
95
95
96
96
/// A list (optional) of timestamp and metadata file location pairs
97
97
/// that encodes changes to the previous metadata files for the table.
98
98
/// Each time a new metadata file is created, a new entry of the
99
99
/// previous metadata file location should be added to the list.
100
100
/// Tables can be configured to remove oldest metadata log entries and
101
101
/// keep a fixed-size log of the most recent entries after a commit.
102
- metadata_log : Vec < MetadataLog > ,
102
+ pub ( crate ) metadata_log : Vec < MetadataLog > ,
103
103
104
104
/// A list of sort orders, stored as full sort order objects.
105
- sort_orders : HashMap < i64 , SortOrderRef > ,
105
+ pub ( crate ) sort_orders : HashMap < i64 , SortOrderRef > ,
106
106
/// Default sort order id of the table. Note that this could be used by
107
107
/// writers, but is not used when reading because reads use the specs
108
108
/// stored in manifest files.
109
- default_sort_order_id : i64 ,
109
+ pub ( crate ) default_sort_order_id : i64 ,
110
110
///A map of snapshot references. The map keys are the unique snapshot reference
111
111
/// names in the table, and the map values are snapshot reference objects.
112
112
/// There is always a main branch reference pointing to the current-snapshot-id
113
113
/// even if the refs map is null.
114
- refs : HashMap < String , SnapshotReference > ,
114
+ pub ( crate ) refs : HashMap < String , SnapshotReference > ,
115
115
}
116
116
117
117
impl TableMetadata {
0 commit comments