Skip to content

Commit ff11801

Browse files
committed
feat: add some misc getters required for manifest evaluation
1 parent 301a0af commit ff11801

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ aws-sdk-glue = "1.21.0"
4747
bimap = "0.6"
4848
bitvec = "1.0.1"
4949
bytes = "1.5"
50-
chrono = "0.4.34"
50+
chrono = "~0.4.34"
5151
derive_builder = "0.20.0"
5252
either = "1"
5353
env_logger = "0.11.0"

crates/iceberg/src/expr/predicate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl<T: Debug, const N: usize> Debug for LogicalExpression<T, N> {
4646
}
4747

4848
impl<T, const N: usize> LogicalExpression<T, N> {
49-
fn new(inputs: [Box<T>; N]) -> Self {
49+
pub(crate) fn new(inputs: [Box<T>; N]) -> Self {
5050
Self { inputs }
5151
}
5252

crates/iceberg/src/spec/manifest.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ impl Manifest {
101101
entries: entries.into_iter().map(Arc::new).collect(),
102102
}
103103
}
104+
105+
/// Get the ID for this Manifest's partition_spec [`PartitionSpec`]
106+
pub fn partition_spec_id(&self) -> i32 {
107+
self.metadata.partition_spec.spec_id
108+
}
104109
}
105110

106111
/// A manifest writer.
@@ -868,6 +873,11 @@ impl ManifestEntry {
868873
&self.data_file.file_path
869874
}
870875

876+
/// Get a reference to the Partition Struct of the data file of this manifest entry
877+
pub fn get_partition_struct(&self) -> &Struct {
878+
&self.data_file.partition
879+
}
880+
871881
/// Inherit data from manifest list, such as snapshot id, sequence number.
872882
pub(crate) fn inherit_data(&mut self, snapshot_entry: &ManifestFile) {
873883
if self.snapshot_id.is_none() {

0 commit comments

Comments
 (0)