Repository navigation
Add SEA inline Arrow results and server-flag routing - #1731
Merged
rahuls-db merged 14 commits intoOct 20, 2026
Merged
Conversation
vuanhphung
approved these changes
Oct 19, 2026
…ownload=0) When UseBoundedSeaApi=1 AND EnableQueryResultDownload=0: 1. Session conf: sends can_cloud_download=false to tell server to inline results instead of using cloud storage. 2. Execute request: uses ARROW_STREAM + INLINE_OR_EXTERNAL_LINKS (instead of JSON_ARRAY + INLINE). This gets Arrow IPC data in the attachment field rather than JSON in data_array. 3. New SeaInlineArrowChunkProvider: lazily fetches inline Arrow chunks via GetResultData with row_offset. Similar to Thrift's LazyThriftInlineArrowResult but using SEA's ArrowIPC format in the attachment field. Decompresses via DecompressionUtil, creates ArrowResultChunk per chunk. End-of-stream when nextChunkIndex is null. 4. getResultChunksData overload: accepts rowOffset parameter, appends ?row_offset=N when bounded SEA is enabled. Without UseBoundedSeaApi=1, EnableQueryResultDownload=0 continues to use the existing JSON_ARRAY inline format (unchanged). Co-authored-by: Isaac Signed-off-by: Gopal Lal <[email protected]>
…oring ThriftStreamingProvider Replace synchronous lazy-fetch design with background prefetch thread using ReentrantLock + Condition signaling, ConcurrentHashMap for indexed chunk storage, and explicit chunksInMemory tracking for backpressure. This ensures consistency with ThriftStreamingProvider's design patterns. Signed-off-by: Gopal Lal <[email protected]> Co-authored-by: Isaac Signed-off-by: Gopal Lal <[email protected]>
Document why nextFetchChunkIndex and nextFetchRowOffset are safe as separate AtomicLongs (single prefetch thread writer) unlike StreamingChunkProvider which needs a bundled FetchPosition holder. Signed-off-by: Gopal Lal <[email protected]> Co-authored-by: Isaac Signed-off-by: Gopal Lal <[email protected]>
…on and server-provided chunk indices - Add DecompressionUtil.decompressLazy() that wraps compressed bytes in LZ4FrameInputStream for lazy decompression (no intermediate byte[] buffer) - Replace eager decompress() with decompressLazy() in processResultData() so ultra-compressed data doesn't blow up memory during decompression - Refactor chunk consumption to use server-provided next_chunk_index via a ConcurrentLinkedQueue instead of assuming sequential indices - Add 30 unit tests for SeaInlineArrowChunkProvider covering single/multi chunk iteration, streaming decompression, error handling, lifecycle, backpressure, edge cases, and prefetch behavior - Add 7 unit tests for DecompressionUtil.decompressLazy() Signed-off-by: Gopal Lal <[email protected]> Co-authored-by: Isaac Signed-off-by: Gopal Lal <[email protected]>
Signed-off-by: Gopal Lal <[email protected]>
Signed-off-by: Gopal Lal <[email protected]>
Signed-off-by: Gopal Lal <[email protected]>
Signed-off-by: Rahul Singhal <[email protected]>
rahuls-db
force-pushed
the
rahul-singhal/sea-inline-server-flag
branch
from
October 19, 2026 20:32
9d6619e to
fe18d86
Compare
vuanhphung
reviewed
Oct 19, 2026
| Format format = cloudFetch ? Format.ARROW_STREAM : Format.JSON_ARRAY; | ||
| // Bounded SEA inline Arrow: use ARROW_STREAM + INLINE_OR_EXTERNAL_LINKS even without CloudFetch | ||
| boolean boundedSeaInline = connectionContext.isBoundedSeaApiEnabled() && !cloudFetch; | ||
| Format format = (cloudFetch || boundedSeaInline) ? Format.ARROW_STREAM : Format.JSON_ARRAY; |
Collaborator
There was a problem hiding this comment.
when arrow is disabled, useCloudFetchForResult() will return false, so boundedSeaInline will be true and we will request arrow. this seems like a bug
Collaborator
Author
Signed-off-by: Rahul Singhal <[email protected]>
Signed-off-by: Rahul Singhal <[email protected]>
Signed-off-by: Rahul Singhal <[email protected]>
rahuls-db
force-pushed
the
rahul-singhal/sea-inline-server-flag
branch
from
October 20, 2026 01:40
5c84361 to
1afd2ee
Compare
rahuls-db
marked this pull request as draft
October 20, 2026 04:48
vuanhphung
approved these changes
Oct 20, 2026
rahuls-db
marked this pull request as ready for review
October 20, 2026 05:14
Signed-off-by: Rahul Singhal <[email protected]>
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 20, 2026
Signed-off-by: Rahul Singhal <[email protected]>
rahuls-db
enabled auto-merge
October 20, 2026 06:57
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 20, 2026
Signed-off-by: Rahul Singhal <[email protected]>
rahuls-db
enabled auto-merge
October 20, 2026 16:21
1 task done
1 of 3 tasks
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Oct 20, 2026
## Description Include the SEA inline Arrow support and server-flag routing from #1731 in JDBC 3.4.4. Roll both entries into the release notes and changelog, clear NEXT_CHANGELOG, and update the release date to October 20. ## Testing Clean core tests and thin/uber packaging passed: 3,780 tests, zero failures or errors, 88 skipped. Both JARs report 3.4.4 and contain the inline Arrow provider. Changelog coverage and git diff --check passed. Fresh remote correctness and benchmark validation are pending before tagging. ## Telemetry Errors - [x] Not applicable — this PR does not add or change a telemetry-visible error. Signed-off-by: Vu Anh Phung <[email protected]>
diegofanesi
pushed a commit
to diegofanesi/databricks-jdbc
that referenced
this pull request
Oct 28, 2026
## Description Route every inline Arrow response through `SeaInlineArrowChunkProvider` when bounded SEA is enabled, including hybrid CloudFetch responses that return their initial data inline. This removes the remaining split between the legacy inline provider and the bounded SEA continuation path. Also handle the provider end-of-stream transition in `ArrowStreamResult.next()` without dereferencing a missing chunk. ## Testing Added a hybrid-inline test that asserts `SeaInlineArrowChunkProvider` is selected and consumes both the initial and continuation chunks. `git diff --check` passes. Full CI will run on this PR. **Comparator Tests** Validated Thrift-versus-SEA parity on the staging warehouse with CloudFetch both enabled and disabled. * 15,242 comparisons per mode across nine configurations, excluding USE_QUERY_FOR_METADATA and PRO_WAREHOUSE * CloudFetch-enabled and disabled runs produced identical results * No differences in query results, row counts, Arrow data, chunk traversal, compression, complex types, geospatial data, or volume operations * All comparator suites completed without execution errors The reported differences were existing Thrift-versus-SEA behavior unrelated to this PR: * 756 getTables/getColumns differences: for empty-string catalog/schema arguments, Thrift throws error 1003 while SEA returns an empty result set. * 275 primary/imported/exported-key metadata differences: both clients reject invalid inputs, but Thrift returns a server stack trace while SEA returns a concise validation error. * 43 negative-test differences: both clients fail as expected but format error messages differently. * 1 stale DDL expectation: both clients return the same additional metadata columns. * 1 EXPLAIN difference: only dynamically generated expression IDs differ. This provides no evidence of a regression from the inline chunk-provider unification. ## Telemetry Errors - [x] Not applicable — this PR does not add or change a telemetry-visible error. - [ ] Applicable — the error uses `DatabricksDriverErrorCode` where appropriate, and any new code is uniquely numbered and tested. - [ ] Applicable — its driver/server/user classification is linked, or maintainer help is requested because the author cannot access the classification. ## Additional Notes to the Reviewer `NO_CHANGELOG=true` This is intentionally separate from databricks#1731 so the request-routing behavior and provider unification can be reviewed independently. --------- Signed-off-by: Rahul Singhal <[email protected]>
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.

Description
Recreate the SEA inline Arrow result support from #1470 on the latest
main, so SEA requests useINLINE_OR_EXTERNAL_LINKSand can consume Arrow bytes returned inline when CloudFetch is disabled.Also remove the client-side CloudFetch prerequisite from automatic client selection. This lets the server-side
enableSqlExecForJdbcflag select SEA whenEnableQueryResultDownload=0, while preserving explicit Thrift selection and existing platform safeguards.The inline provider supports bounded multi-chunk fetching, lazy streaming LZ4 decompression, unknown manifest row counts, and cleanup of prefetched results.
Testing
DatabricksConnectionContextTest: 161 passed.SeaInlineArrowChunkProviderTest: 30 passed.ArrowStreamResultTest: 26 passed.DatabricksResultSetMetaDataTest: 36 passed.DatabricksResultSetTest: 68 passed.DecompressionUtilTest: 13 passed.DatabricksSdkClientTestpassed.Telemetry Errors
DatabricksDriverErrorCodewhere appropriate, and any new code is uniquely numbered and tested.Additional Notes to the Reviewer
The server-side SQL Execution API feature flag remains the rollout control. The live E2E test is included but was not run locally.