tustvold commented on code in PR #2221:
URL: https://github.com/apache/arrow-rs/pull/2221#discussion_r933063809
##########
parquet/src/column/writer/encoder.rs:
##########
@@ -30,16 +30,21 @@ use crate::util::memory::ByteBufferPtr;
/// A collection of [`ParquetValueType`] encoded by a [`ColumnValueEncoder`]
pub trait ColumnValues {
- /// The underlying value type
- type T: ParquetValueType;
-
/// The number of values in this collection
fn len(&self) -> usize;
+}
- /// Returns the min and max values in this collection, skipping any NaN
values
- ///
- /// Returns `None` if no values found
- fn min_max(&self, descr: &ColumnDescriptor) -> Option<(&Self::T,
&Self::T)>;
Review Comment:
This is moved onto Encoder so that `ColumnValues` can be a type-erased type,
e.g. ArrayRef. This will be critical to support dictionaries without needing
GATs, as the TypedDictionary (#2136) contains a lifetime.
--
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]