arrowbricks 5.0.1__tar.gz → 5.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/PKG-INFO +1 -1
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/pyproject.toml +1 -1
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/Cargo.lock +1 -1
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/Cargo.toml +1 -1
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/client/download.rs +16 -1
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/LICENSE +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/README.md +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/.gitignore +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/README.md +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/examples/duckdb_query.py +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/examples/fastapi_sse.py +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/proptest-regressions/json_convert.txt +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/rustfmt.toml +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/arrow_ffi.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/client/error.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/client/model.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/client/sea.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/client/thrift_rpc.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/client/volume.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/client.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/heartbeat.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/json_convert.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/lib.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/pipeline/ndjson.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/pipeline/reorder.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/pipeline/sea.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/pipeline/stats.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/pipeline/test_support.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/pipeline/thrift_exec.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/pipeline.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/src/thrift.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/tests/common/mod.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/tests/wiremock_pipeline.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/tests/wiremock_thrift.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/tests/wiremock_volume_files.rs +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/tests_py/conftest.py +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/tests_py/test_ipc_stream.py +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/tests_py/test_parameters.py +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/tests_py/test_stream_ndjson_lines.py +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/tests_py/test_streaming.py +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/tests_py/test_thrift.py +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/tests_py/test_token_provider.py +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/tests_py/test_volume_files.py +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/tests_py/thrift_mock.py +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/src/arrowbricks/__init__.py +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/src/arrowbricks/_core.pyi +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/src/arrowbricks/_streaming.py +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/src/arrowbricks/client.py +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/src/arrowbricks/cursor.py +0 -0
- {arrowbricks-5.0.1 → arrowbricks-5.0.2}/src/arrowbricks/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "arrowbricks"
|
|
3
|
-
version = "5.0.
|
|
3
|
+
version = "5.0.2"
|
|
4
4
|
description = "Runs SQL against a Databricks SQL warehouse via the Statement Execution API and hands you the result as Arrow -- a DB-API-ish Cursor (fetchone/fetchmany/fetchall/fetchall_arrow) or NDJSON streaming. Rust/PyO3 core throughout -- zero required runtime dependencies."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -67,6 +67,21 @@ pub(crate) fn decompress_lz4_frame(compressed: &Bytes) -> Result<Bytes, ApiError
|
|
|
67
67
|
Ok(Bytes::from(out))
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
/// Reads the body into one buffer sized from `Content-Length`. Frames are
|
|
71
|
+
/// freed as they are consumed, so a chunk peaks at about its own size instead
|
|
72
|
+
/// of the ~2x `Response::bytes()` reaches while joining collected frames.
|
|
73
|
+
async fn read_body(mut resp: reqwest::Response) -> Result<Bytes, reqwest::Error> {
|
|
74
|
+
// Cap the up-front reservation so a bogus header can't demand gigabytes.
|
|
75
|
+
let Some(len) = resp.content_length().map(|n| n.min(1 << 30) as usize) else {
|
|
76
|
+
return resp.bytes().await;
|
|
77
|
+
};
|
|
78
|
+
let mut buf = Vec::with_capacity(len);
|
|
79
|
+
while let Some(frame) = resp.chunk().await? {
|
|
80
|
+
buf.extend_from_slice(&frame);
|
|
81
|
+
}
|
|
82
|
+
Ok(Bytes::from(buf))
|
|
83
|
+
}
|
|
84
|
+
|
|
70
85
|
impl DbClient {
|
|
71
86
|
/// Unauthenticated -- external links are presigned blob-storage URLs,
|
|
72
87
|
/// same as `_fetch_link_bytes` in the Python client. `compressed` decodes
|
|
@@ -99,7 +114,7 @@ impl DbClient {
|
|
|
99
114
|
let text = resp.text().await.unwrap_or_default();
|
|
100
115
|
return Err(ApiError::from_status(status, &text, true));
|
|
101
116
|
}
|
|
102
|
-
let bytes = resp
|
|
117
|
+
let bytes = read_body(resp).await.map_err(|e| ApiError::from_reqwest(e, true))?;
|
|
103
118
|
// Counted here, before decompression -- "downloaded" means bytes
|
|
104
119
|
// actually received off the wire, which is exactly the smaller,
|
|
105
120
|
// (usually) LZ4-compressed size `compress_results` exists to
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/proptest-regressions/json_convert.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/tests/wiremock_volume_files.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/tests_py/test_stream_ndjson_lines.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arrowbricks-5.0.1 → arrowbricks-5.0.2}/rust/arrowbricks_core/tests_py/test_token_provider.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|