Writer: flat array stats should match the ones Rust keeps per encoding node
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
Start by reading flat/writer.rs and the listed encoding files in the Rust source to trace which statistics each encoding inherits and retains. Then inspect Java's flat writer and cascade, along with the vortex-jni integration tests, to compare stats on every node for the listed column shapes. Done means the per-node stats match between writers, with the string min/max and null-count expectations updated where Rust omits them.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Follow-up to #581. vortex-java and vortex-jni write different stats into flat segments' ArrayNodes.
What Rust does
FlatLayoutStrategy doesn't compute stats; it keeps the ones already cached on the array (flat/writer.rs: "flat layouts do not force compute stats during write, they only retain pre-computed stats"). It serializes them on every node of the tree. So what ends up in a node depends on what the compressor computed while picking a scheme, and on which encodings pass those stats on to their output array (statistics().inherit* / with_stats_set in encodings/fastlanes/src/bitpacking/array/bitpack_compress/{global,blocked}.rs, vortex-btrblocks/src/schemes/integer/{bitpacking,for_}.rs, vortex-btrblocks/src/schemes/float/alp.rs, encodings/sequence/src/array.rs, encodings/runend/src/array.rs, encodings/zstd/src/zstd_buffers.rs, vortex-array/src/executor.rs).
Observed (same 20k-row data through both writers, all stats Exact)
| root encoding (Rust) | Rust writes | Java writes |
|---|---|---|
vortex.primitive, fastlanes.bitpacked |
min, max, is_constant=false, null_count | min, max, null_count |
vortex.sequence |
is_sorted, is_strict_sorted | min, max, null_count |
vortex.alp, vortex.alprd, vortex.fsst, vortex.constant |
nothing | min, max, null_count |
vortex.bool |
is_constant | min, max, null_count |
| child nodes (ALP's sequence, FSST offsets, validity bool, dict codes) | often stats (sorted flags, min/max/sum/null_count) | never: Java writes stats on the root only |
Zone-map table segments differ too. Rust's struct children carry stats and aren't masked; Java wraps each field in vortex.masked and writes no child stats.
Plan
- Port the inheritance rules per encoding from the Rust source (not from the table above), applied through Java's cascade to every node, root and children.
- Cross-check: the same data through vortex-jni and vortex-java, asserting identical per-node stats (encoding, stat set, values, precision) for each column shape: sorted/random/small-range ints, random/sorted floats, low- and high-cardinality strings, bool, nullable, constant.
Expected consequences (intended, per the parity directive)
- Java-written string columns lose their flat min/max (FSST and dict values keep none in Rust). So
VortexReader.columnStats()string min/max and the SQLMIN/MAXstats shortcut go away for them, as already happens for Rust-written files.JavaWritesRustReadsIntegrationTest#javaWriter_jniReader_filteredUtf8_prunesOnTruncatedBounds(and the emoji test above it) then expectnullmin/max. - Flat-path pruning with zone maps disabled mostly stops for non-primitive encodings.
- Numeric
columnStatsare unaffected, because they come from the zone table. VortexWriter.buildArrayFlatBuffer's comment saysnull_countis always written "matching the Rust writer". vortex-jni no longer does that for every encoding, so the comment and the IS NULL pruning it enables need checking.
The zone-table segment shape (masked fields, child stats) is a separate gap and could be split out.
- Ngôn ngữ chính
- Java
- Star
- 3
- Fork
- 2
- Merge trung bình
- 14 giờ 59 phút
- Pull request đã merge (30 ngày)
- 137
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọ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 dfa1/vortex-java
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
dfa1/vortex-java#636 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
dfa1/vortex-java#634 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
dfa1/vortex-java#601 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
dfa1/vortex-java#567 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
dfa1/vortex-java#548 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của dfa1/vortex-java
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
liberation-data/drivine4j#547 ·
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 70/100
-
BindingServiceProperties.bindings regressed to a non-thread-safe TreeMap in GH-3158: concurrent first use of binding names corrupts itCó thể đã có người làm @AkashB23 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
spring-cloud/spring-cloud-stream#3321 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] 资源包列表 与 模组/数据包/世界 列表排列顺序不一致Có thể đã có người làm @fishdry1000 đã nhận 4 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-driven-fuzzing bug claude Minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
linagora/twake-calendar-side-service#1333 ·
Maintainer thường phản hồi trong vòng 1 ngày