Repository navigation
fix(kernel): honor the Arrow compression setting - #1081
aakash-saravanan-db wants to merge 2 commits into
Conversation
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 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)) |
There was a problem hiding this comment.
🟠 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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Status: blocked on the dependencies and validation limitations listed below.
Feature or gap
Python callers can set
enable_query_result_lz4_compressionwhen 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).