Writer: numeric dict layout is chosen by a 2,048-distinct cap; Rust probes and writes several dictionaries
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 28/100
Hướng nghiên cứu
Start in DictColumnState.isDictCandidate and the GLOBAL_DICT_MAX_CARDINALITY cap in vortex-java, then compare with DictStrategy in vortex-layout/src/layouts/dict/writer.rs, which probes a sample and writes several dictionaries. Read ADR 0021 before changing the heuristic. Reproduce with Int64NarrowingInteropIntegrationTest using a one-column HASH_CSV dump. Done means the RefererHash tree matches the vortex-jni dict layout and high-cardinality I64/F64 columns show no regressions.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Raincloud clickbench-hits, vortex-java's Parquet import vs the vortex-jni-written file, data bytes (99.997M rows):
| column | type | Rust | Java |
|---|---|---|---|
| RefererHash | I64 | 401.0 MB | 791.3 MB (1.97x) |
| URLHash | I64 | 427.3 MB | 790.0 MB (1.85x) |
Cause (confirmed)
Not integer narrowing: the values are full 64-bit. Rust writes these columns as a dict layout; Java writes plain vortex.primitive (8 bytes a row).
Reproduced with 131,072 real RefererHash rows (first chunk of ClickBench hits.parquet, ~23k distinct), written by both writers:
| file | tree | |
|---|---|---|
| vortex-jni | 434 KB | vortex.dict layout: vortex.primitive values + fastlanes.bitpacked codes |
| vortex-java | 1,050 KB | vortex.primitive |
Synthetic i32/u32/i16-range, mixed and full-i64 columns already produce identical trees in both writers, so narrowing is not involved.
- Rust (
vortex-layout/src/layouts/dict/writer.rs,DictStrategy): compresses a probe sample with the cascade; if the result is aDict, it writes a dict layout, up tou16::MAXvalues per dictionary, and starts a new dictionary when the constraint is hit. - Java (
DictColumnState.isDictCandidate): a numeric column is offered a global dict only with at mostGLOBAL_DICT_MAX_CARDINALITY(2,048) distinct values and under 50% distinct, one dictionary for the whole column, demoted to per-chunk encoding past the cap. This column has ~23k distinct per chunk and ~719k over 2M rows.
Fix
Raising the cap is not enough: over the whole column Rust writes several dictionaries in sequence. Parity means replacing the cardinality heuristic with Rust's probe-then-multi-dictionary flow (touches ADR 0021, and the comment on the cap says a global dict hurt some high-cardinality I64/F64 columns, so check those for regressions).
Repro: Int64NarrowingInteropIntegrationTest (exploratory, not committed), fed HASH_CSV=<one-column dump>.
- Ngôn ngữ chính
- Java
- Star
- 3
- Fork
- 2
- Merge trung bình
- 9 giờ 51 phút
- Pull request đã merge (30 ngày)
- 127
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#657 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
dfa1/vortex-java#655 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
perf
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
dfa1/vortex-java#651 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Writer: string columns written as per-chunk dicts where Rust uses its dict layout (up to 2x larger)Đang mởperf
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
dfa1/vortex-java#650 ·
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ự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Dans-Plugins/Medieval-Roleplay-Engine#396 ·
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 72/100
Maintainer thường phản hồi trong vòng 6 ngày
-
Update spring-security to 7.1.3Đang mởtype: dependency-upgrade
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
spring-projects/spring-session#4156 ·
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 68/100
quarkiverse/quarkus-langchain4j#3127 · 1 bình luận ·
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 72/100
HotswapProjects/HotswapAgent#688 ·