File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ mod avro;
73
73
pub mod io;
74
74
pub mod spec;
75
75
76
- pub mod metadata_scan ;
76
+ pub mod metadata_table ;
77
77
pub mod scan;
78
78
79
79
pub mod expr;
Original file line number Diff line number Diff line change @@ -38,27 +38,27 @@ use crate::Result;
38
38
/// - <https://iceberg.apache.org/docs/latest/spark-queries/#querying-with-sql>
39
39
/// - <https://py.iceberg.apache.org/api/#inspecting-tables>
40
40
#[ derive( Debug ) ]
41
- pub struct MetadataTable ( Table ) ;
41
+ pub struct MetadataTable < ' a > ( & ' a Table ) ;
42
42
43
- impl MetadataTable {
43
+ impl < ' a > MetadataTable < ' a > {
44
44
/// Creates a new metadata scan.
45
- pub ( super ) fn new ( table : Table ) -> Self {
45
+ pub ( super ) fn new ( table : & ' a Table ) -> Self {
46
46
Self ( table)
47
47
}
48
48
49
49
/// Get the history table.
50
50
pub fn history ( & self ) -> HistoryTable {
51
- HistoryTable { table : & self . 0 }
51
+ HistoryTable { table : self . 0 }
52
52
}
53
53
54
54
/// Get the snapshots table.
55
55
pub fn snapshots ( & self ) -> SnapshotsTable {
56
- SnapshotsTable { table : & self . 0 }
56
+ SnapshotsTable { table : self . 0 }
57
57
}
58
58
59
59
/// Get the manifests table.
60
60
pub fn manifests ( & self ) -> ManifestsTable {
61
- ManifestsTable { table : & self . 0 }
61
+ ManifestsTable { table : self . 0 }
62
62
}
63
63
}
64
64
@@ -591,7 +591,7 @@ mod tests {
591
591
partition_summaries: ListArray
592
592
[
593
593
StructArray
594
- -- validity:
594
+ -- validity:
595
595
[
596
596
valid,
597
597
]
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ use std::sync::Arc;
22
22
use crate :: arrow:: ArrowReaderBuilder ;
23
23
use crate :: io:: object_cache:: ObjectCache ;
24
24
use crate :: io:: FileIO ;
25
- use crate :: metadata_scan :: MetadataTable ;
25
+ use crate :: metadata_table :: MetadataTable ;
26
26
use crate :: scan:: TableScanBuilder ;
27
27
use crate :: spec:: { TableMetadata , TableMetadataRef } ;
28
28
use crate :: { Error , ErrorKind , Result , TableIdent } ;
@@ -203,7 +203,7 @@ impl Table {
203
203
204
204
/// Creates a metadata table which provides table-like APIs for inspecting metadata.
205
205
/// See [`MetadataTable`] for more details.
206
- pub fn metadata_table ( self ) -> MetadataTable {
206
+ pub fn metadata_table ( & self ) -> MetadataTable < ' _ > {
207
207
MetadataTable :: new ( self )
208
208
}
209
209
You can’t perform that action at this time.
0 commit comments