[C++] Reader cannot resolve Java fixed-offset writer timezone IDs such as GMT-00:00
Đá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
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- data-engineering, databases
Hướng nghiên cứu
Start with c++/src/Timezone.cc, especially getTimezoneByName and getTimezoneByFilename, then run orc-contents against the supplied gmt-0000.orc fixture. Confirm that the reader accepts the GMT-00:00 writerTimezone and still handles normal zoneinfo names correctly.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I was closing out some old Arrow issues and this one (apache/arrow#21471, from 2019) looks like it is potentially an ORC bug rather than an Arrow one. I don't understand this domain well myself, so everything below the line was produced by Claude working through the ORC and Arrow source with me. I have checked that the reprex fails against current main (4dbfe288) as described, but I have not independently verified the code reading, so please treat it accordingly. I have tried to keep it concise.
Cause
When the JVM's default zone is a fixed offset, the Java writer records a custom ID such as GMT-00:00 or GMT+05:30 as the stripe writerTimezone (WriterImpl.java:563 uses TimeZone.getDefault().getID()). The Java reader accepts these because TimeZone.getTimeZone parses GMT±hh:mm (TreeReaderFactory.java:1251).
The C++ reader resolves a writer timezone only by opening $TZDIR/<name> (getTimezoneByName in c++/src/Timezone.cc), plus the US/* alias map from ORC-2011. No such file exists for GMT-00:00, so any stripe with a timestamp column fails:
$ orc-contents gmt-0000.orc
Caught exception in gmt-0000.orc: Time zone file /usr/share/zoneinfo/GMT-00:00 does not exist. Please install IANA time zone database and set TZDIR env.
Adding a GMT-00:00 symlink to GMT under TZDIR makes the same file read fine, so the timezone name is the only problem with it.
Reprex
gmt-0000.orc (250 bytes) has one stripe, one timestamp column, uncompressed, with writerTimezone set to GMT-00:00. It was written with the C++ writer via pyorc (with TZDIR pointed at a directory containing a GMT-00:00 zone file) to reproduce the footer field that Hive produced in the original report.
gmt-0000.orc as base64 (decode with base64 -d)
T1JDCgYSBAgBUAAKHgoEAAAAABIWCAFKEBjA2u/vslogwNrv77JaMAFQAHYAD9kwyEAAAAoGCAYQABgICgYIBhABGCAKBggBEAEYBgoGCAUQARgDEgQIABAAEgQIAhAAGglHTVQtMDA6MDAKHgoECAFQAAoWCAFKEBjA2u/vslogwNrv77JaMAFQAAgDEGgaCggDECgYCSA3KAEiDwgMEgEBGgJ0cyAAKAAwACIICAkgACgAMAAwAToECAFQADoWCAFKEBjA2u/vslogwNrv77JaMAFQAECQTkgBYgUyLjEuNAhXEAAYgIAEIgIADCggMAaC9AMDT1JDFw==
Suggested fix (untested)
Recognise names matching GMT[+-]hh(:mm)? in getTimezoneByFilename and return a fixed-offset Timezone instead of loading a file. The Etc/GMT±n zoneinfo files are not a substitute since they only cover whole hours and use the inverted POSIX sign.
- Ngôn ngữ chính
- Java
- Star
- 769
- Fork
- 515
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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/orc
-
estimateRgEndOffset slop calculation is insufficient for incompressible dataCó thể đã có người làm @thexiay đã nhận 154 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
-
cross compileĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
-
C21 publishes `reactivemongo/core/SSL` as Java 23 bytecode — TLS connections fail on any JDK < 23Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
ReactiveMongo/ReactiveMongo#1520 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
liquid-java/liquidjava#373 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
ga4gh/phenopacket-schema#465 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
NationalSecurityAgency/ghidra#9748 ·
Maintainer thường phản hồi trong vòng 1 ngày