You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "eric-maynard (via GitHub)" <gi...@apache.org> on 2025/08/21 17:58:35 UTC
[PR] Test both vectorized and nonvectorized readers in Parquet golden file tests [iceberg]
eric-maynard opened a new pull request, #13890:
URL: https://github.com/apache/iceberg/pull/13890
#13450 added new tests for specific Parquet encodings that leverage pre-baked files. However, the test currently only reads these using the nonvectorized reader. This PR updates that test to check each file's data using both the vectorized and nonvectorized readers. Only files that are supported by both readers are included for the time being.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Test both vectorized and nonvectorized readers in Parquet golden file tests [iceberg]
Posted by "eric-maynard (via GitHub)" <gi...@apache.org>.
eric-maynard commented on code in PR #13890:
URL: https://github.com/apache/iceberg/pull/13890#discussion_r2294243089
##########
spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/data/vectorized/parquet/TestParquetVectorizedReads.java:
##########
@@ -73,7 +72,7 @@ public class TestParquetVectorizedReads extends AvroDataTestBase {
private static final String PLAIN = "PLAIN";
private static final List<String> GOLDEN_FILE_ENCODINGS =
- ImmutableList.of("PLAIN_DICTIONARY", "RLE", "RLE_DICTIONARY", "DELTA_BINARY_PACKED");
Review Comment:
Yes, there was only one RLE file and it's being removed
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Test both vectorized and nonvectorized readers in Parquet golden file tests [iceberg]
Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao commented on code in PR #13890:
URL: https://github.com/apache/iceberg/pull/13890#discussion_r2292110697
##########
spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/data/vectorized/parquet/TestParquetVectorizedReads.java:
##########
@@ -73,7 +72,7 @@ public class TestParquetVectorizedReads extends AvroDataTestBase {
private static final String PLAIN = "PLAIN";
private static final List<String> GOLDEN_FILE_ENCODINGS =
- ImmutableList.of("PLAIN_DICTIONARY", "RLE", "RLE_DICTIONARY", "DELTA_BINARY_PACKED");
Review Comment:
Since we don't test `RLE` encoding any more, shall we remove the RLE parquet file?
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Test both vectorized and nonvectorized readers in Parquet golden file tests [iceberg]
Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao merged PR #13890:
URL: https://github.com/apache/iceberg/pull/13890
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Test both vectorized and nonvectorized readers in Parquet golden file tests [iceberg]
Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao commented on PR #13890:
URL: https://github.com/apache/iceberg/pull/13890#issuecomment-3221570663
Merged. Thanks @eric-maynard for the PR! Thanks @kevinjqliu for the review!
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Test both vectorized and nonvectorized readers in Parquet golden file tests [iceberg]
Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao commented on code in PR #13890:
URL: https://github.com/apache/iceberg/pull/13890#discussion_r2292118768
##########
spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/data/vectorized/parquet/TestParquetVectorizedReads.java:
##########
@@ -440,31 +439,28 @@ public void testUuidReads() throws Exception {
assertRecordsMatch(schema, numRows, data, dataFile, false, BATCH_SIZE);
}
- private void assertIdenticalFileContents(File actual, File expected, Schema schema)
- throws IOException {
- try (CloseableIterable<InternalRow> actualReader =
- Parquet.read(Files.localInput(actual))
+ private void assertIdenticalFileContents(
+ File actual, File expected, Schema schema, boolean vectorized) throws IOException {
+ try (CloseableIterable<Record> expectedIterator =
+ Parquet.read(Files.localInput(expected))
.project(schema)
- .createReaderFunc(t -> SparkParquetReaders.buildReader(schema, t, ID_TO_CONSTANT))
+ .createReaderFunc(msgType -> GenericParquetReaders.buildReader(schema, msgType))
.build()) {
- Iterator<InternalRow> actualIterator = actualReader.iterator();
- try (CloseableIterable<InternalRow> plainReader =
- Parquet.read(Files.localInput(expected))
- .project(schema)
- .createReaderFunc(t -> SparkParquetReaders.buildReader(schema, t, ID_TO_CONSTANT))
- .build()) {
- Iterator<InternalRow> expectedIterator = plainReader.iterator();
-
- List<InternalRow> expectedList = Lists.newArrayList();
- expectedIterator.forEachRemaining(expectedList::add);
- List<InternalRow> actualList = Lists.newArrayList();
- actualIterator.forEachRemaining(actualList::add);
-
- assertThat(actualList)
- .as("Comparison between files failed %s <-> %s", actual, expected)
- .isNotEmpty()
- .hasSameSizeAs(expectedList)
- .hasSameElementsAs(expectedList);
+ if (vectorized) {
+ List<Record> expectedRecords = Lists.newArrayList(expectedIterator);
+ assertRecordsMatch(
+ schema, expectedRecords.size(), expectedRecords, actual, false, BATCH_SIZE);
+ } else {
+ try (CloseableIterable<Record> actualIterator =
+ Parquet.read(Files.localInput(actual))
+ .project(schema)
+ .createReaderFunc(msgType -> GenericParquetReaders.buildReader(schema, msgType))
Review Comment:
shall we test `SparkParquetReaders` instead?
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org