emkornfield commented on code in PR #17877:
URL: https://github.com/apache/arrow/pull/17877#discussion_r1080690591
##########
cpp/src/parquet/column_reader_test.cc:
##########
@@ -757,6 +760,63 @@ TEST_F(RecordReaderTest, BasicReadRepeatedField) {
/*levels_position=*/0);
}
+// Tests reading the nullable values without saving a space for nulls.
+TEST_F(RecordReaderTest, ReadDenseForNullable) {
+ Init(/*max_def_level=*/1, /*max_rep_level=*/1, Repetition::REPEATED,
+ /*read_dense_for_nullable=*/true);
+
+ // Records look like: {[10], null, [20, 20], null, [30, 30, 30], null}
+ std::vector<std::shared_ptr<Page>> pages;
+ std::vector<int32_t> values = {10, 20, 20, 30, 30, 30};
+ std::vector<int16_t> def_levels = {1, 0, 1, 1, 0, 1, 1, 1, 0};
Review Comment:
we should probably add a test for when 3 level encoding lists so we can
check behavior for a list containing a null element and an empty list?
--
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]