Older `parquet-java` readers fail on files with unprojected VARIANT columns
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Bắt đầu với ParquetMetadataConverter.getLogicalTypeAnnotation và các vị trí stack trong ParquetMetadataConverter.java, sau đó chạy test đang thất bại TestReadWithUnknownLogicalType đối với parquet-testing/shredded_variant/case-001.parquet. Được xem là hoàn tất khi một lần đọc có chiếu của id dung thứ cho cột VARIANT không được chiếu, trong khi các trường không được hỗ trợ vẫn chỉ thất bại khi được đọc theo ngữ nghĩa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
parquet-java 1.15.x fails when opening a Parquet file that contains a VARIANT column, even if the application only requests other columns and does not request the VARIANT column.
The failure happens while converting the footer schema, before projection is applied. The parquet-format compatibility guidance says that new logical types are intended to be forward compatible: https://github.com/apache/parquet-format/blob/master/CONTRIBUTING.md#compatibility-and-feature-enablement
Based on that, I think older readers should be able to tolerate an unknown logical type when that field is not part of the requested projection.
Repro
This can be reproduced with the VARIANT fixture in apache/parquet-testing:
git clone https://github.com/apache/parquet-testing.git
PARQUET_FILE="$PWD/parquet-testing/shredded_variant/case-001.parquet"
The file contains an id column and a var column annotated with VARIANT.
Using parquet-java 1.15.x, try to read only id through the normal GroupReadSupport projection path:
Path input = new Path(args[0]);
try (ParquetReader<Group> reader = ParquetReader.builder(new GroupReadSupport(), input)
.set(
ReadSupport.PARQUET_READ_SCHEMA,
"message root {\n" + "optional int32 id;\n" + "}")
.build()) {
Group row = reader.read();
System.out.println(row.getInteger("id", 0));
}
I also put up a draft repro PR with a failing unit test against parquet-1.15.x: https://github.com/kevinjqliu/parquet-java/pull/1
That test uses apache/parquet-testing/shredded_variant/case-001.parquet and requests only the id column. It still fails while reading footer metadata, before the projected read can happen.
Actual behavior
The read fails during footer schema conversion:
[ERROR] org.apache.parquet.hadoop.TestReadWithUnknownLogicalType.testReadProjectedColumnFromFileWithUnknownLogicalType -- Time elapsed: 0.283 s <<< ERROR!
java.lang.NullPointerException: Cannot invoke "org.apache.parquet.format.LogicalType$_Fields.ordinal()" because the return value of "org.apache.parquet.format.LogicalType.getSetField()" is null
at org.apache.parquet.format.converter.ParquetMetadataConverter.getLogicalTypeAnnotation(ParquetMetadataConverter.java:1174)
at org.apache.parquet.format.converter.ParquetMetadataConverter.buildChildren(ParquetMetadataConverter.java:1892)
at org.apache.parquet.format.converter.ParquetMetadataConverter.fromParquetSchema(ParquetMetadataConverter.java:1840)
at org.apache.parquet.format.converter.ParquetMetadataConverter.fromParquetMetadata(ParquetMetadataConverter.java:1670)
at org.apache.parquet.format.converter.ParquetMetadataConverter.readParquetMetadata(ParquetMetadataConverter.java:1630)
at org.apache.parquet.hadoop.ParquetFileReader.readFooter(ParquetFileReader.java:629)
at org.apache.parquet.hadoop.ParquetFileReader.<init>(ParquetFileReader.java:934)
at org.apache.parquet.hadoop.ParquetFileReader.<init>(ParquetFileReader.java:925)
The stack points to ParquetMetadataConverter.getLogicalTypeAnnotation.
Expected behavior
Older readers should tolerate an unknown logical type in the footer when the field is not projected, preserving the physical schema or treating the field as having no known logical annotation.
They should only fail if the unsupported field is actually read or interpreted semantically.
Notes
This is relevant for files written by newer or external writers that contain VARIANT, where older readers only need unrelated columns.
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.6k
- Merge trung bình
- 4 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 30
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/parquet-java
-
Row-group copying collides for distinct column paths with the same dot stringCó thể đã có người làm @costas-db đã nhận 6 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
apache/parquet-java#3829 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Binary statistics truncation test ignores its configured truncation lengthCó thể đã có người làm @dhruv-15-03 đã nhận 8 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
apache/parquet-java#3820 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Make PageReader AutoCloseableĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
apache/parquet-java#3767 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Remove duplicate LICENSE and NOTICE files from benchmark JARsCó thể đã có người làm @efegokdemir đã nhận 11 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/parquet-java#3695 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Close input readers when ParquetRewriter setup failsCó thể đã có người làm @anxkhn đã nhận 82 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/parquet-java#3667 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của apache/parquet-java
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
-
[Bug] The shared instance selector's placeholder and no-match text ignore the display languageCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
apache/rocketmq-dashboard#5561 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
HMCL-dev/HMCL#6934 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
test(setup): GitHub configuration tests fail when the temp path is long enough for YAML foldingĐang mởbug good first issue help wanted priority medium size S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
martin-francois/symphony-trello#776 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Console.printHexĐang mởgood first issue kernel
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
JackFurton/who-would-build-a-kernel-in-java#33 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày