Skip to content

test(kernel): cover maxRows over kernel result batches - #662

Open
cathleeny wants to merge 1 commit into
mainfrom
cathleeny/ddf-max-rows-fetch-size-nodejs
Open

cathleeny wants to merge 1 commit into
mainfrom
cathleeny/ddf-max-rows-fetch-size-nodejs

Conversation

@cathleeny

@cathleeny cathleeny commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds a unit test for how maxRows behaves on kernel connections. No library code changes. As
CONNECTION_PARAMETERS.md already documents, executeStatement({ maxRows }) is not sent to the kernel, which picks
its own batch sizes, and fetchChunk({ maxRows }) still returns chunks of exactly maxRows rows.

What changes

  • tests/unit/kernel/execution.test.ts: feeds 4096- and 781-row kernel batches and checks that
    fetchChunk({ maxRows: 1000 }) returns [1000, 1000, 1000, 1000, 877] with every row in order, and that
    executeStatement({ maxRows }) passes no options to the kernel.

Testing

Live, driver from this branch with the kernel binding 1.5.0:

Case Kernel, DBSQL Kernel, Reyden Thrift, DBSQL
range(100000), execute and fetchChunk with maxRows: 1000: 100 × 1000 rows ✅ ✅ ✅
range(100000), default execute, fetchChunk with maxRows: 1000: 100 × 1000 rows ✅ ✅ ✅
range(2000000), maxRows: 10000: 200 × 10000 rows ✅ (CloudFetch) ✅ (inline) ✅

Each case ran on the backend it asked for, with no fallback to the other.

Unit: npm test (1892 passing), lint, prettier and type-check pass.

Not run: Thrift on Reyden (Reyden doesn't support Thrift).

Dependencies

None.

This pull request and its description were written by Isaac.

Add a hermetic facade test for the kernel backend: executeStatement
maxRows is not forwarded to the kernel, and fetchChunk({maxRows: 1000})
over 4096- and 781-row kernel Arrow batches returns 1000-row chunks
(last 877) with every row in order.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
@cathleeny
cathleeny marked this pull request as ready for review December 3, 2026 23:04

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

This branch was previously deployed

1 inactive deployment
azure-prod — aeb87e11 Deployed Dec 3, 2026 by cathleeny via e2e-test (22.23.4, 22_23_4) #2313
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant