anoopj commented on code in PR #3328:
URL: https://github.com/apache/iceberg-rust/pull/3328#discussion_r4234065404
##########
crates/iceberg/src/expr/visitors/page_index_evaluator.rs:
##########
@@ -167,6 +168,17 @@ impl<'a> PageIndexEvaluator<'a> {
return self.select_all_rows();
};
+ // Declared byte width of a FIXED_LEN_BYTE_ARRAY column, used to detect
+ // truncated page-index bounds when decoding decimals. `None` when the
+ // column metadata is absent or reports no fixed width.
+ let type_length = self
+ .row_group_metadata
+ .columns()
+ .get(parquet_column_index)
+ .map(|column| column.column_descr().type_length())
+ .filter(|&len| len > 0)
+ .map(|len| len as usize);
Review Comment:
Kept len as usize: it's guarded by `.filter(|&len| len > 0)`, so the cast is
on a positive i32 and lossless
--
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]