CTTY commented on code in PR #2695:
URL: https://github.com/apache/iceberg-rust/pull/2695#discussion_r3589696461
##########
crates/iceberg/src/arrow/reader/pipeline.rs:
##########
@@ -248,6 +250,15 @@ impl FileScanTaskReader {
record_batch_transformer_builder.with_constant(RESERVED_FIELD_ID_FILE,
file_datum);
}
+ if task
+ .project_field_ids()
+ .contains(&RESERVED_FIELD_ID_SPEC_ID)
+ {
+ let spec_id_datum =
Datum::int(task.partition_spec.clone().unwrap().spec_id());
Review Comment:
nit: how about just this? added some syntax candy :D
```rust
let partition_spec = task.partition_spec.as_ref().ok_or_else(|| {
Error::new(
ErrorKind::Unexpected,
"Partition spec is missing",
)
})?;
let spec_id_datum = Datum::int(partition_spec.spec_id());
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]