Commit d83d1b9
feat(writer): compress the global-dict Utf8 values pool (#299)
The global-dict flush wrote a low-cardinality Utf8 column's distinct-values pool
as raw vortex.varbin, so it never captured substring redundancy across dictionary
entries (shared "STREET"/"AVENUE"/borough tokens) — a large part of the nyc-311
file-size gap vs the Rust reference, which dict-encodes *and* FSST-compresses the
same columns.
writeGlobalDictUtf8Column now runs the values pool through the normal Utf8
competition (FSST/VarBin/Zstd) with vortex.dict excluded, so the cascade never
wraps the dictionary in a second dict the reader cannot unwrap. Threaded via a new
excludedFromCascade argument on writeSegment. At cascade depth 0 (no competition)
it keeps forcing flat VarBin as before.
Verified: values pool is FSST-encoded and round-trips (new integration test);
80 writer dict tests and 217 Java-writes-Rust-reads interop tests still pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent f11716c commit d83d1b9
2 files changed
Lines changed: 139 additions & 9 deletions
File tree
- integration/src/test/java/io/github/dfa1/vortex/integration
- writer/src/main/java/io/github/dfa1/vortex/writer
Lines changed: 108 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
Lines changed: 31 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | 591 | | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
597 | 612 | | |
598 | 613 | | |
599 | 614 | | |
| |||
624 | 639 | | |
625 | 640 | | |
626 | 641 | | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
627 | 645 | | |
628 | 646 | | |
629 | 647 | | |
| |||
1510 | 1528 | | |
1511 | 1529 | | |
1512 | 1530 | | |
1513 | | - | |
1514 | | - | |
1515 | | - | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
1516 | 1536 | | |
1517 | | - | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
1518 | 1540 | | |
1519 | 1541 | | |
1520 | 1542 | | |
| |||
0 commit comments