Skip to content

feat(results): make Arrow LZ4 compression configurable - #511

Open
aakash-saravanan-db wants to merge 3 commits into
mainfrom
aakash-saravanan_data/feat/lz4-compression-toggle-20261127
Open

aakash-saravanan-db wants to merge 3 commits into
mainfrom
aakash-saravanan_data/feat/lz4-compression-toggle-20261127

Conversation

@aakash-saravanan-db

Copy link
Copy Markdown
Collaborator

Status: blocked on the dependencies and validation limitations listed below.

Feature or gap

Applications using the SQL kernel need to request compressed or uncompressed Arrow results.

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, Python, Node.js, C, and Arrow Database Connectivity (ADBC) interfaces expose the setting where they configure result compression.

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: true queries with compressed inline results compared with the Thrift backend (542→664 ms, +22.4%); that gap is not yet resolved.

Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 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.

Comment thread pyo3/src/statement.rs Resolved
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 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 — 1 medium concern. Requests, defaults and overrides are wired correctly, and the wiremock, pyo3 and napi tests send the request and check the result_compression value it carries.

Comment thread adbc/src/config.rs Resolved

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 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 · 1 Low

The change is mostly correct, with one medium and one low concern. The SEA request resolves the statement override against the session default as expected, and the wiremock tests check the codec sent with reuse and reset.

* Recognised keys (case-insensitive):
* - "cloudfetch_enabled" = "true"|"false" — false serves every result
* through paged inline delivery without cloud-storage downloads.
* - "lz4_compression_enabled" = "true"|"false", for LZ4 compression

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Low — PyO3 (set_lz4_compression) and napi (lz4Compression) expose the per-statement override, but the C ABI only gets the session-level client-conf key. ODBC and Go hosts therefore can't override compression per statement. Add a kernel_statement_set_lz4_compression setter, or document that the C ABI only supports the session default.

🔀 Found by Claude Opus 5.5 · the judge couldn't confirm it

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The C ABI exposes the session default through kernel_session_config_set_client_conf, which takes KernelSessionConfig in the header. ODBC's connection-string setting uses that path. Per-statement overrides are exposed by the Rust, PyO3 and napi interfaces. This is the scope confirmed in the accepted clarification.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still open at b305326: include/databricks_kernel.h:597-598 does not say the C ABI supports only the session default, and there is no statement setter.

Comment thread adbc/src/config.rs Resolved

This branch was successfully deployed

1 active deployment
azure-prod — b305326f Deployed Nov 27, 2026 by oss-reviewer-bot[bot] via followup #4382
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant