Repository navigation
Conversation
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>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a unit test for how
maxRowsbehaves on kernel connections. No library code changes. AsCONNECTION_PARAMETERS.mdalready documents,executeStatement({ maxRows })is not sent to the kernel, which picksits own batch sizes, and
fetchChunk({ maxRows })still returns chunks of exactlymaxRowsrows.What changes
tests/unit/kernel/execution.test.ts: feeds 4096- and 781-row kernel batches and checks thatfetchChunk({ maxRows: 1000 })returns[1000, 1000, 1000, 1000, 877]with every row in order, and thatexecuteStatement({ maxRows })passes no options to the kernel.Testing
Live, driver from this branch with the kernel binding 1.5.0:
range(100000), execute andfetchChunkwithmaxRows: 1000: 100 × 1000 rowsrange(100000), default execute,fetchChunkwithmaxRows: 1000: 100 × 1000 rowsrange(2000000),maxRows: 10000: 200 × 10000 rowsEach 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.