GH-48231 [C++][Parquet] Add FSST encoding support for Parquet - #48232
GH-48231 [C++][Parquet] Add FSST encoding support for Parquet#48232ArnavBalyan wants to merge 16 commits into
Conversation
|
|
|
cc @julienledem @emkornfield will fix builds soon thanks |
|
Thanks for creating the PoC implementation! I haven't yet checked the detail about the FSST algorithm. IMHO it is generally fine to directly depend on https://github.com/cwida/fsst for PoC and benchmark. I'm not sure how much effort is required to write our own FSST implementation. We care about maintainability and are strict with adding a new 3rd party dependency, especially when we have already depended on cc @pitrou |
|
Thanks for taking a look, yeah this is something we briefly discussed in the Parquet sync, generally https://github.com/cwida/fsst should be reliable for FSST. Re-implementing it might require some duplication, will discuss in Parquet sync if we can get a consensus on the dependency. |
Apologies, i haven't had a chance to look at this yet, but a reminder the sync is not an official place to come to consensus (official decisions should be discussed and finalized on the mailing list). Another option is to vendor/copy most of the FSST library in the source tree. This also impacts Arrow should probably be brought up on both mailing lists. |
Sure that works too! Just wanted to get a consensus with the community, will start a mail thread instead. Let me check the vendor/copy option, should be 6-7 files from FSST if we opt to duplicate relevant code. |
|
Eliminated the direct dependency on fsst, which is working well. Will check on email thread the feedback from community, and update if needed. |
|
cc @wgtmac could you please re-run the test. Just checking if it's not related by fsst by any chance thanks! |
There was a problem hiding this comment.
If we bundle a dependency (copy to cpp/src/arrow/vendored/), we don't need to change this file.
See also:
arrow/cpp/src/arrow/CMakeLists.txt
Lines 447 to 483 in 79d6458
There was a problem hiding this comment.
If we want to bundle a dependency, could you use cpp/src/arrow/vendored/ instead of cpp/thirdparty/?
https://github.com/apache/arrow/tree/main/cpp/src/arrow/vendored
|
I think before we spend a lot of time reviewing this we should try to close out on the overall design on the parquet mailing list. Could we maybe mark this as a draft? |
Standalone C++ harness comparing FSST (the vendored PR apache#48232 codec), the OnPair implementation, zstd level 1 and lz4 on the same string corpora, reporting compression ratio and encode/decode throughput under realistic bit-packed accounting. Includes a dict-encode-then-OnPair variant for repetitive columns and an OnPair-auto path that picks the dictionary budget per column to minimize size (storing the resulting code width). The Rust bench-fsst-onpair generator produces the corpora (18 TPC-H string columns plus synthetic URL and JSON/variant columns) via --dump-corpora so the harness reads identical inputs.
Standalone C++ harness comparing FSST (the vendored PR apache#48232 codec), the OnPair implementation, zstd level 1 and lz4 on the same string corpora, reporting compression ratio and encode/decode throughput under realistic bit-packed accounting. Decode is bulk whole-column over the bit-packed code stream, so ratio and decode are mutually consistent. Includes a dict-encode-then-OnPair variant for repetitive columns and an OnPair-auto path that picks the dictionary budget per column to minimize size (storing the resulting code width). The Rust bench-fsst-onpair generator produces the corpora (18 TPC-H string columns plus synthetic URL and JSON/variant columns) via --dump-corpora so the harness reads identical inputs.
|
This work is continued in #50872 |
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?