Skip to content

fix(kernel): honor Node.js Arrow compression options - #652

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

Node.js callers can set useLZ4Compression on the client or override it for an individual statement. The kernel backend previously ignored both settings.

What this PR addresses

The kernel backend forwards the statement override or the client default for direct and asynchronous queries. Both inline and CloudFetch Arrow results use the requested codec.

Dependencies

The native kernel must support the lz4Compression execute option. Source integration tests pin the corresponding revision. The published connector requires a compatible native package.

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

Tests and validation

Type checks, ESLint and 1,859 unit tests passed. Optimized builds passed all six live compression cases and both precedence directions on direct/async paths. For compressed inline results with runAsync: true, five-pair timing was 542 ms Thrift → 664 ms kernel (+22.4%). Inline uncompressed runAsync: true and inline default-path (runAsync unset) timings with either codec met parity. The released kernel makes the same status and close requests; they contribute cost, but the difference is not fully attributed.

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

Logic looks correct, with 1 medium concern. Forwarding and precedence are right on both the direct and async paths, and the tests cover every combination. The docs and changelog say support has shipped, but the native package pins haven't been bumped.


const execOptions: KernelNativeExecuteOptions = {};
const execOptions: KernelNativeExecuteOptions = {
lz4Compression: options.useLZ4Compression ?? this.context.getConfig().useLZ4Compression,

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 backend now always sends lz4Compression, but the kernel platform packages are still pinned to 1.5.0. Only KERNEL_REV and the type declaration changed, so installed binaries probably ignore the field and the option has no effect. Publish and pin native packages that support it, or document the dependency.

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

The supporting native package requirement is documented in this PR’s Dependencies section and linked to kernel PR databricks/databricks-sql-kernel#511. Published 1.5.0 does not provide the opt-out, so this PR remains blocked until a supporting native package is published and the platform package pins are updated to its assigned version.

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 bcdd5a1: platform packages stay pinned to 1.5.0, which doesn't support lz4Compression. Pins need updating once a supporting package is published.

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

The forwarding logic looks correct, with one medium concern. Both the direct and async paths use the statement value first and fall back to the client setting, and the tests cover all four combinations. The problem is that the docs and CHANGELOG describe support that the native packages pinned in package.json don't ship yet.


const execOptions: KernelNativeExecuteOptions = {};
const execOptions: KernelNativeExecuteOptions = {
lz4Compression: options.useLZ4Compression ?? this.context.getConfig().useLZ4Compression,

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 driver now sends lz4Compression, but only KERNEL_REV is bumped and the published kernel optionalDependencies stay at 1.5.0. An older binding would likely ignore the field, so the option would be silently dropped. Pin a compatible published kernel across all platform packages, or document the required follow-up bump in the CHANGELOG.

🔀 Found by both reviewers · confirmed by the judge

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.

This is the same open supporting-native-package prerequisite acknowledged above and documented under Dependencies. The PR remains blocked until a supporting package is published and its assigned version is pinned; no version is assigned yet. Kernel PR: databricks/databricks-sql-kernel#511.

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 9fb2352: CHANGELOG.md:5 claims kernel useLZ4Compression support, but kernel optionalDependencies stay at 1.5.0 and the CHANGELOG doesn't mention the required bump.

This branch was successfully deployed

1 active deployment
azure-prod — 9fb23529 Deployed Nov 27, 2026 by aakash-saravanan-db via e2e-test (24.22.1, 24_22_1) #2244
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