Repository navigation
Description
Summary
When ResultConfig::cloudfetch_enabled = false, the SEA ExecuteStatement request sends disposition = "INLINE" with format = "ARROW_STREAM". The Databricks SEA server rejects this combination:
HTTP 400: Incompatible parameters: The format field must be JSON_ARRAY when the disposition field is INLINE.
error_code: INVALID_PARAMETER_VALUE
So cloudfetch_enabled = false is currently unusable on SEA — any query issued with CloudFetch disabled fails at ExecuteStatement.
This is a regression introduced by #225 (fix(cloudfetch): disable via per-statement disposition, not session conf, commit 106fb55). #225 correctly removed the old CAN_CLOUD_DOWNLOAD session-conf approach (which #196 flagged), but the replacement INLINE disposition it now sends is paired with the wrong format.
Root cause
src/client/sea.rs call_execute_api (origin/main @ 93bf97f):
// line 461
let disposition = if self.config.cloudfetch_enabled {
"INLINE_OR_EXTERNAL_LINKS"
} else {
"INLINE"
};
let request_body = ExecuteStatementRequest {
...
disposition: disposition.to_string(),
format: "ARROW_STREAM".to_string(), // line 473 — always ARROW_STREAM
...
};The format field is hardcoded to ARROW_STREAM for both dispositions. The server accepts ARROW_STREAM with INLINE_OR_EXTERNAL_LINKS (the CloudFetch-enabled path, which works), but requires JSON_ARRAY when the disposition is bare INLINE.
The in-code comment (sea.rs:451-455) states the intent to keep Arrow:
// `INLINE`: the server serves every result inline (Arrow bytes in
// the response `attachment`), regardless of size. `format` stays
// `ARROW_STREAM` — the kernel's inline reader consumes Arrow IPC
// from the attachment (the SEA inline-Arrow path), so unlike JDBC
// we keep Arrow rather than switching to `JSON_ARRAY`.
— but the server does not support INLINE + ARROW_STREAM, so this intent doesn't hold in practice.
The tension (why this isn't a one-line fix)
The kernel's inline reader consumes Arrow IPC from the response attachment (src/reader/mod.rs inline-Arrow path; inline_arrow_data: result.attachment). Simply switching to format = "JSON_ARRAY" for the INLINE disposition would satisfy the server but the inline reader would then receive JSON rather than Arrow and break.
So a correct fix needs one of:
- Server support for
INLINE+ARROW_STREAM(if the inline-Arrow disposition is meant to be reachable that way), or - The kernel sending a disposition/format pair the server accepts AND the reader can parse — e.g. the
INLINE_OR_EXTERNAL_LINKS+ARROW_STREAMpair that already works, but constrained so results come back inline (no external links). The reference JDBC driver switches toJSON_ARRAYforINLINE; the kernel would need its reader to handle that, or a different mechanism to force inline-only while keeping Arrow.
Maintainers should decide the intended contract; this issue is to flag that the current combination is rejected by the server.
Reproduce
Against a Databricks SQL warehouse (SEA), with a kernel built from main (@ 93bf97f):
let mut rc = databricks_sql_kernel::ResultConfig::default();
rc.cloudfetch_enabled = false;
let session = /* open session with rc */;
// any query:
session.execute("SELECT 1 AS value").await
// -> Err: HTTP 400 "The format field must be JSON_ARRAY when the disposition
// field is INLINE" (INVALID_PARAMETER_VALUE)Observed in the databricks-driver-test kernel nightly (CLOUDFETCH-012, test_cloud_fetch_disabled_configuration), on both the dbsql and Reyden warehouses — it is not warehouse-specific. The nightly began failing 2026-07-26, immediately after #225 merged (was green through 2026-07-25).
Impact
cloudfetch_enabled = false cannot be used on SEA — the feature is currently non-functional. Any consumer disabling CloudFetch (e.g. to force inline delivery or to sidestep CloudFetch download issues) gets a hard 400 on the first statement.
Related
- cloudfetch_enabled=false synthesises CAN_CLOUD_DOWNLOAD conf that SEA rejects (CONFIG_NOT_AVAILABLE) #196 — the prior
CAN_CLOUD_DOWNLOADrejection (CLOSED, fixed by fix(cloudfetch): disable via per-statement disposition, not session conf #225). This issue is the follow-on defect introduced by that fix. - fix(cloudfetch): disable via per-statement disposition, not session conf #225 — the change that introduced the
INLINE+ARROW_STREAMrequest.
Activity
eric-wang-1990 commentedon Aug 11, 2026
Additional analysis on the fix direction — the naive "switch to
JSON_ARRAY" is not viable, and the sibling ADBC driver avoids this entirely.The kernel has no JSON_ARRAY processor
src/statement/spec.rsResultFormatsupports only Arrow:Every result-decode path is Arrow-only —
parse_arrow_ipc→arrow_ipc::reader::StreamReaderfor both CloudFetch chunks and the inlineattachment(types/sea.rs:242"Inline Arrow IPC data"). There is no JSON row decoder insrc/reader/.So satisfying the server by sending
format = "JSON_ARRAY"with theINLINEdisposition would just move the failure from the request side to the read side — the kernel would have no way to parse the JSON_ARRAY response body. JSON support is explicitly a future (v1+) capability.How the ADBC C# driver avoids this
The reference ADBC driver (
adbc-drivers/databricks,csharp/src/StatementExecution/) does not hit this:UseCloudFetchoption on the SEA path is accepted but ignored (StatementExecutionStatement.cs:258— "accept but ignore for now"), so there is no auto-flip to a bareINLINEdisposition.result_dispositionandresult_formatare independent connection properties, defaulting toINLINE_OR_EXTERNAL_LINKS+ARROW_STREAM— the pairing the server accepts. Inline delivery of small results happens naturally throughINLINE_OR_EXTERNAL_LINKS(the server returns the result inline when it fits), never through bareINLINE.InlineArrowStreamReader) is also Arrow-only, so ADBC would have the same read-side problem if it ever sentINLINE+JSON_ARRAY.Practical fix options
INLINE+ARROW_STREAM(the pairing the kernel wants for the inline-Arrow path), orINLINEfor cloudfetch-disable. KeepINLINE_OR_EXTERNAL_LINKS+ARROW_STREAM(already valid and Arrow-parseable) and rely on the server returning small results inline — mirroring how ADBC delivers inline results without a dedicated disable toggle. If a hard "never use external links" guarantee is required, that likely needs a server-supported disposition that pairs withARROW_STREAM.Investigated from databricks-driver-test while triaging the kernel Reyden/dbsql nightly (CLOUDFETCH-012). Kernel
main@ 93bf97f; ADBCmain@ ae4c228.github-actions commentedon Sep 11, 2026
This issue has been marked as Stale because it has been open for 30 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue.
github-actions commentedon Sep 18, 2026
This issue was closed because it has been inactive for 7 days since being marked as stale.