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


##########
parquet/src/record/reader.rs:
##########
@@ -138,7 +138,15 @@ impl TreeBuilder {
                 .column_descr_ptr();
             let col_reader = row_group_reader.get_column_reader(orig_index)?;
             let column = TripletIter::new(col_descr, col_reader, 
self.batch_size);
-            Reader::PrimitiveReader(field, Box::new(column))
+            let reader = Reader::PrimitiveReader(field.clone(), 
Box::new(column));
+            if repetition == Repetition::REPEATED && path.len() == 1 {
+                if curr_def_level != 1 || curr_rep_level != 1 {
+                    return Err(ParquetError::General(format!("Top level 
REPEATED primitve field {} should have definition and repetition levels of 1", 
field.name())));

Review Comment:
   Right but this could be contained in a nullable group for example



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

Reply via email to