Skip to content

fix(kernel): honor the Arrow compression setting - #1081

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

aakash-saravanan-db wants to merge 2 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

Python callers can set enable_query_result_lz4_compression when connecting. The kernel backend previously ignored this setting.

What this PR addresses

The connector passes the configured value to each kernel statement before synchronous or asynchronous execution.

Dependencies

The kernel wheel must include Statement.set_lz4_compression. The source-based integration job pins the corresponding kernel revision. The released connector extra requires a compatible published kernel wheel.

Kernel PR: databricks/databricks-sql-kernel#511.

Tests and validation

The 284 focused client tests and Black passed, including integer 0 normalization before sync/async dispatch. Optimized builds verified inline and CloudFetch values and codecs on both paths; five paired query timings per case met the ±10% median band (3.6–9.5% faster than Thrift).

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 High

Needs changes: 1 high concern. The forwarding and its test look correct, but the unconditional call breaks query execution on any kernel wheel the current ^1.5.0 floor still allows.

try:
stmt.set_sql(operation)
stmt.set_row_limit(row_limit)
stmt.set_lz4_compression(bool(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.

🟠 High — The setter is called unconditionally on every kernel statement, but pyproject.toml still allows ^1.5.0 kernel wheels that may lack set_lz4_compression, so those installs would fail on every query. Raise the kernel version floor to a release that has the setter, and update the lockfile.

🔀 Found by both reviewers · confirmed by the judge

@aakash-saravanan-db aakash-saravanan-db Nov 27, 2026 •

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.

Agreed. This PR is blocked on a published kernel release containing Statement.set_lz4_compression, followed by an update to the connector kernel dependency floor and resolved package pins before merge/release. The source integration uses the supporting commit from kernel PR databricks/databricks-sql-kernel#511; a supporting release version is not assigned yet.

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 4ed87de: pyproject.toml:73 still allows ^1.5.0, and client.py:669 still calls the setter unconditionally. Merge is blocked until a kernel release raises the floor.

This branch was previously deployed

1 inactive deployment
azure-prod — 4ed87de6 Deployed Nov 27, 2026 by oss-reviewer-bot[bot] via followup #2682
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