Copilot commented on code in PR #3819:
URL: https://github.com/apache/iceberg-rust/pull/3819#discussion_r4791007712
##########
crates/iceberg/src/spec/manifest/_serde.rs:
##########
@@ -317,7 +317,20 @@ fn parse_bytes_entry(v: Vec<BytesEntry>, schema: &Schema)
-> Result<HashMap<i32,
.as_primitive_type()
.ok_or_else(|| invalid_data!("field {} is not a primitive
type", field.name))?
.clone();
- m.insert(entry.key, Datum::try_from_bytes(&entry.value,
data_type)?);
+ // A bound that does not decode (e.g. a string bound truncated
inside a multi-byte
+ // UTF-8 character) is skipped: bounds are optional, and a missing
bound only means
+ // the column's values in this file are not used for pruning.
+ match Datum::try_from_bytes(&entry.value, data_type) {
+ Ok(datum) => {
+ m.insert(entry.key, datum);
+ }
+ Err(err) => tracing::warn!(
Review Comment:
If a position-delete file lacks `referenced_data_file`, dropping an
undecodable `file_path` bound forces partition routing
(`delete_file_index.rs:240–246`). That route rejects different partition-spec
IDs (`:345–354`), so a delete targeting an older-spec file can be silently
skipped and deleted rows returned. Preserve decode errors for
`RESERVED_FIELD_ID_DELETE_FILE_PATH` until that fallback handles these deletes
safely; ordinary column bounds can still be skipped.
--
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]