etseidl commented on code in PR #9619:
URL: https://github.com/apache/arrow-rs/pull/9619#discussion_r3314288628
##########
parquet/src/column/writer/mod.rs:
##########
@@ -1477,80 +1513,106 @@ impl<'a, E: ColumnValueEncoder>
GenericColumnWriter<'a, E> {
}
fn update_min<T: ParquetValueType>(descr: &ColumnDescriptor, val: &T, min:
&mut Option<T>) {
- update_stat::<T, _>(descr, val, min, |cur| compare_greater(descr, cur,
val))
+ if min.is_none() {
+ *min = Some(val.clone());
+ } else {
+ // safe to unwrap min since we've already tested for None
+ let basic_type_info = descr.get_basic_info();
Review Comment:
Well, I was trying to short-circuit this if `min` hasn't yet been set. But
that's probably a silly optimization because it turns out this function isn't
called all that much. I'll try reworking and see what that does.
--
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]