You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "etseidl (via GitHub)" <gi...@apache.org> on 2026/05/01 00:10:55 UTC

Re: [PR] feat(parquet): compact level representation with generic writer dispatch [arrow-rs]

etseidl commented on code in PR #9831:
URL: https://github.com/apache/arrow-rs/pull/9831#discussion_r3171446726


##########
parquet/src/column/writer/mod.rs:
##########
@@ -314,6 +314,54 @@ impl<T: Default> ColumnMetrics<T> {
     }
 }
 
+/// Borrowed view of level data, analogous to `&str` for `LevelData`'s `String`.
+///
+/// This type exists so that [`GenericColumnWriter::write_batch_internal`] can accept
+/// level data from two callers without allocating: the public [`GenericColumnWriter::write_batch`]
+/// API wraps caller-provided `&[i16]` slices directly as `Materialized`, while the Arrow
+/// writer path converts owned `LevelData` via `.as_ref()` (which may also produce `Uniform`).
+#[derive(Debug, Clone, Copy)]
+pub(crate) enum LevelDataRef<'a> {

Review Comment:
   Just curious why this is defined here rather than where `LevelData` is defined.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org