You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/06/01 12:13:08 UTC

[GitHub] [arrow-rs] tustvold commented on a diff in pull request #4327: Don't split record across pages (#3680)

tustvold commented on code in PR #4327:
URL: https://github.com/apache/arrow-rs/pull/4327#discussion_r1213058826


##########
parquet/src/column/writer/mod.rs:
##########
@@ -308,6 +308,17 @@ impl<'a, E: ColumnValueEncoder> GenericColumnWriter<'a, E> {
         max: Option<&E::T>,
         distinct_count: Option<u64>,
     ) -> Result<usize> {
+        // Check if number of definition levels is the same as number of repetition levels.
+        if let (Some(def), Some(rep)) = (def_levels, rep_levels) {

Review Comment:
   There are already tests of this, they're actually how I realised that the slicing logic would panic :sweat_smile: 



-- 
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