Repository navigation
feat(results): make Arrow LZ4 compression configurable - #511
aakash-saravanan-db merged 5 commits into
Conversation
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 Low
Looks good, with 1 low concern. The codec is resolved correctly: the statement override wins over the session default, and metadata calls pick up the session default through ExecuteParams::default(). Wiremock tests cover the default, override and reset cases for the Rust, napi, C ABI and metadata paths.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 3 Low
Looks good overall, with 3 low-severity concerns. The codec choice (statement override, then session default, then LZ4) is wired correctly through SEA execute, metadata and ADBC. The concerns are uneven binding coverage and tests that don't check the request body sent over the wire.
b305326 to
0af849a
Compare
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Medium
Looks good, with 1 medium concern: the ADBC option key doesn't match the C# sibling driver's key. Session and statement precedence, reset behavior and wire codec selection are wired correctly and tested across the Rust API and each binding.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 Medium
Looks good, with 1 medium concern. Sending NONE when LZ4 is off matches the C# driver, None correctly falls back to the session default, and the tests cover all bindings. The concern is that ADBC doesn't accept the C# driver's LZ4 option key.
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 Nit
Looks good, with one low-severity test gap. The codec choice (statement override, else session default) reaches the SEA request in one place and is tested at the wiremock, C ABI, PyO3, napi and ADBC layers. The public structs stay #[non_exhaustive], so the new fields don't break callers.
Other findings
- ⚪ Nit — The last valid value set is
Int(1), so the field istrue(the default) when the invalid-value loop runs, and theassert!(...)can't tell "unchanged" from "reset to default". Set the option tofalsebefore the loop and assert it staysfalse. (Found by Claude Opus 5.5 · confirmed by the judge)
Status: merge awaits current-head CI and review.
Feature or gap
The released SQL kernel always requests LZ4 compression for Arrow results, so applications cannot opt out.
What this PR addresses
LZ4 remains enabled by default. The kernel accepts a session default and a statement override, and uses the corresponding codec for inline and CloudFetch requests. The Rust API and the Python (PyO3) and Node.js (napi) bindings expose statement overrides. The C and Arrow Database Connectivity (ADBC) interfaces expose only the session default.
Dependencies
None.
Tests and validation
Request tests cover defaults, overrides, reset, and metadata. Optimized source-built drivers returned complete values with both codecs and delivery modes. Comparable timings met parity or improved except Node.js
runAsync: truequeries with compressed inline results compared with the Thrift backend (542→664 ms, +22.4%); that gap is not yet resolved.