Skip to content

Commit e7ff597

Browse files
committed
Format, update comments
1 parent b9e6f1e commit e7ff597

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

crates/iceberg/src/arrow/reader.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,9 @@ mod tests {
16561656
use crate::expr::{Bind, Predicate, Reference};
16571657
use crate::io::FileIO;
16581658
use crate::scan::{FileScanTask, FileScanTaskDeleteFile, FileScanTaskStream};
1659-
use crate::spec::{DataContentType, DataFileFormat, Datum, NestedField, PrimitiveType, Schema, SchemaRef, Type};
1659+
use crate::spec::{
1660+
DataContentType, DataFileFormat, Datum, NestedField, PrimitiveType, Schema, SchemaRef, Type,
1661+
};
16601662

16611663
fn table_schema_simple() -> SchemaRef {
16621664
Arc::new(

crates/iceberg/src/scan/task.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,21 @@ pub struct FileScanTask {
5959
/// The list of delete files that may need to be applied to this data file
6060
pub deletes: Vec<FileScanTaskDeleteFile>,
6161

62-
/// Partition data tuple from the manifest entry.
63-
/// Schema based on the partition spec, using partition field ids for struct field ids.
62+
/// Partition data from the manifest entry, used to identify which columns can use
63+
/// constant values from partition metadata vs. reading from the data file.
64+
/// Per the Iceberg spec, only identity-transformed partition fields should use constants.
6465
#[serde(skip)]
6566
pub partition: Option<Struct>,
6667

67-
/// The partition spec ID for this file.
68-
#[serde(skip_serializing_if = "Option::is_none")]
68+
/// The partition spec ID for this file, required to look up the correct
69+
/// partition spec and determine which fields are identity-transformed.
70+
/// Not serialized as partition data is runtime-only and populated from manifest entries.
71+
#[serde(skip)]
6972
pub partition_spec_id: Option<i32>,
7073

71-
/// The partition spec for this file (for computing constants from partition data).
74+
/// The partition spec for this file, used to distinguish identity transforms
75+
/// (which use partition metadata constants) from non-identity transforms like
76+
/// bucket/truncate (which must read source columns from the data file).
7277
#[serde(skip)]
7378
pub partition_spec: Option<Arc<PartitionSpec>>,
7479
}

0 commit comments

Comments
 (0)