You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit eb04529
Browse filesBrowse the repository at this point in the historyBrowse files
feat(results): make Arrow LZ4 compression configurable (#511)
Status: merge awaits current-head CI and review.
## Feature or gap
The released SQL kernel always requests LZ4 compression for Arrow
results, so applications cannot opt out.
## What this PR addresses
LZ4 remains enabled by default. The kernel accepts a session default and
a statement override, and uses the corresponding codec for inline and
CloudFetch requests. The Rust API and the Python (PyO3) and Node.js
(napi) bindings expose statement overrides. The C and Arrow Database
Connectivity (ADBC) interfaces expose only the session default.
## Dependencies
None.
## Tests and validation
Request tests cover defaults, overrides, reset, and metadata. Optimized
source-built drivers returned complete values with both codecs and
delivery modes. Comparable timings met parity or improved except Node.js
`runAsync: true` queries with compressed inline results compared with
the Thrift backend (542→664 ms, +22.4%); that gap is not yet resolved.
---------
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Copy file name to clipboardExpand all lines: CONNECTION_PARAMETERS.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -228,6 +228,7 @@ Setting only one of `client_cert_pem` / `client_key_pem` is rejected at
228
228
| Field | Description | Default |
229
229
|-------|-------------|---------|
230
230
|`cloudfetch_enabled`| Opt into CloudFetch (cloud-storage-backed download of large results via presigned URLs). Set `false` to force the inline-Arrow path (mirrors JDBC `EnableQueryResultDownload=0`). |`true`|
231
+
|`lz4_compression_enabled`| Request LZ4 compression for Arrow results, including inline and CloudFetch delivery. Statements can override this default via `StatementSpec::lz4_compression`. |`true`|
231
232
|`cloudfetch_link_prefetch_window`| Number of presigned URLs to prefetch ahead of the consumer. |`10`|
232
233
|`cloudfetch_max_chunks_in_memory`| Max decompressed CloudFetch chunks held in memory at once (bounds download parallelism and peak RSS). |`16`|
233
234
|`inline_max_chunks_in_memory`| Prefetch window for the inline-Arrow path (used when CloudFetch is disabled). `1` disables prefetching. |`4`|
@@ -314,12 +315,12 @@ Each key mirrors a field of [`ResultConfig`](#resultconfig--result-handling-opti
314
315
| Key | Description | Default |
315
316
|-----|-------------|---------|
316
317
|`cloudfetch_enabled`| Same knob as `ResultConfig::cloudfetch_enabled` — opt into CloudFetch (`false` forces the inline-Arrow path). |`true`|
318
+
|`lz4_compression_enabled`| Same knob as `ResultConfig::lz4_compression_enabled` — request LZ4 compression for Arrow results. |`true`|
317
319
|`cloudfetch_link_prefetch_window`| Same knob as `ResultConfig::cloudfetch_link_prefetch_window` — number of presigned URLs to prefetch ahead of the consumer. |`10`|
318
320
|`cloudfetch_max_chunks_in_memory`| Same knob as `ResultConfig::cloudfetch_max_chunks_in_memory` — max decompressed CloudFetch chunks held in memory at once. Values above `256` are clamped (with a warning) rather than rejected (peak RSS scales with this, so the ceiling bounds OOM risk). |`16`|
319
321
|`inline_max_chunks_in_memory`| Same knob as `ResultConfig::inline_max_chunks_in_memory` — prefetch window for the inline-Arrow path. `1` disables prefetching. |`4`|
320
322
|`complex_types_as_json`| Same knob as `ResultConfig::complex_types_as_json` — render complex columns as compact JSON strings instead of native Arrow nested types. |`false`|
321
323
|`intervals_as_string`| Same knob as `ResultConfig::intervals_as_string` — render `INTERVAL` / `DURATION` columns as canonical Databricks text instead of native Arrow interval types. |`false`|
322
324
323
-
Compression (LZ4) is **not** a parameter: the kernel detects it from the
324
-
server's result manifest (`result_compression`) and decompresses
325
-
`LZ4_FRAME` payloads automatically.
325
+
The kernel reads the codec from the server's result manifest
326
+
(`result_compression`) and decompresses `LZ4_FRAME` payloads automatically.
0 commit comments