Commit 8d39dc1
authored
fix: remove azure suffix range request (delta-io#1006)
resolves delta-io#968 (I hope)
## What changes are proposed in this pull request?
TLDR: Fixes kernel (default-engine) error when trying to read on azure.
`arrow-55` introduced [support for reading parquet metadata via suffix
range requests](apache/arrow-rs#7334) but since
azure [doesn't support suffix range
requests](https://github.com/apache/arrow-rs-object-store/blob/9c43521d3c8e86fdfc4df788a5a63e45e23093b7/src/azure/client.rs#L912-L918)
whenever anyone tried reading an azure table with default-engine based
on arrow-55 it [blew
up](delta-io#968).
This PR mitigates by re-adding the original `head` request so that we
can pass the `file_size` to the `ParquetObjectReader::with_file_size`
which states that when this API is used, the reader will ensure only
bounded range requests are used:
```rust
/// Provide the byte size of this file.
///
/// If provided, the file size will ensure that only bounded range requests are used. If file
/// size is not provided, the reader will use suffix range requests to fetch the metadata.
///
/// Providing this size up front is an important optimization to avoid extra calls when the
/// underlying store does not support suffix range requests.
///
/// The file size can be obtained using [`ObjectStore::list`] or [`ObjectStore::head`].
pub fn with_file_size(self, file_size: usize) -> Self { ... }
```
## How was this change tested?
tested manually.. painfully manually. spun up a public azure container
thing and pointed our example code at it. was able to repro the
following error without my changes and observe it going away after
changes here applied.
```
Parquet(
External(
NotSupported {
source: "Azure does not support suffix range requests",
},
),
)
```
obviously highlights our test gap. working on setting up some
environments to test against S3/ADLS/GCS/etc.1 parent bf012fc commit 8d39dc1
1 file changed
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
269 | 290 | | |
270 | 291 | | |
271 | 292 | | |
| |||
0 commit comments