Skip to content

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

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

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

Conversation

@aakash-saravanan-db

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

Copy link
Copy Markdown
Collaborator

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

Merge requires published native kernel packages supporting the lz4Compression execute option and updated pins for every platform package. Source integration tests pin the supporting kernel revision.

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

Tests and validation

Local checks on the current source passed 270 focused tests, type checks and scoped formatting. Earlier complete source validation passed ESLint and 1,859 unit tests. 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.

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

Comment thread lib/kernel/KernelSessionBackend.ts 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 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.

Comment thread lib/kernel/KernelSessionBackend.ts 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 High

Looks good, with 1 low concern. The client default and per-statement override are forwarded the same way on the direct and async paths, and tests cover both precedence directions. Shipping still depends on a published native package that includes kernel PR #511.

Comment thread CHANGELOG.md 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).

✅ No issues identified.

@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).

✅ No issues identified.

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>
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
@aakash-saravanan-db
aakash-saravanan-db force-pushed the aakash-saravanan_data/feat/lz4-compression-toggle-20261127 branch from c8ccba7 to 366e37d Compare December 3, 2026 20:03

@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

Looks good, no blocking issues. The kernel now forwards the statement override, or the client default, as lz4Compression on both the direct and async paths, and the precedence tests cover both. Merge still has to wait for the published native packages and the platform pin bumps, as the CHANGELOG says.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.


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 every platform package is still pinned to 1.5.0, so installed users get a kernel that ignores the option. The CHANGELOG documents this and the earlier port change did the same. Bump the pins and lockfile once the kernel release with databricks/databricks-sql-kernel#511 is published.

🔀 Found by GPT-6.1 Sol · 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.

Agreed. The source pin now selects the merged kernel, but that does not update the published native packages. This remains open until supporting packages are published, all eight platform pins and the lockfile are updated, and the installed or bundled pair is validated.

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 366e37d: all eight platform pins remain 1.5.0 (package.json:95-102), and the lockfile hasn't been updated.

This branch was previously deployed

1 inactive deployment
azure-prod — 366e37d3 Deployed Dec 3, 2026 by aakash-saravanan-db via e2e-test (24.22.1, 24_22_1) #2305
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.

2 participants