Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions benchmarks/compress-bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ See [`src/main.rs`](./src/main.rs) for the dataset list and CLI flags (`--format
cargo run -p compress-bench --profile release_debug
```

Lance is behind the `lance` feature, and `--formats` accepts it only in a binary built with
it. Only the post-merge `develop` benchmark covers Lance; the pull-request `Compression`
comment does not, to keep the PR matrix cheap:

```bash
cargo run -p compress-bench --profile release_debug --features lance \
-- --formats arrow-ipc,parquet,lance,vortex
```

Lance files are written at storage version 2.2, the newest stable version. Storage versions at or
above 2.1 use structural encoding, which is what applies Lance's compressive encodings — bitpacking,
FSST, general compression. Note that `LanceFileVersion::Stable` resolves to 2.1, the default for new
datasets, rather than to the newest stable version, so 2.2 has to be named explicitly.

## GPU decompression

`--gpu-decompress` is opt-in, requires the `cuda` feature, and restricts the suite to the
Expand Down
5 changes: 4 additions & 1 deletion benchmarks/lance-bench/src/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ impl Compressor for LanceCompressor {
.to_str()
.ok_or_else(|| anyhow!("Failed to convert path to str"))?;
let reader_iter = RecordBatchIterator::new(batches.into_iter().map(Ok), Arc::clone(schema));
let write_params = WriteParams::with_storage_version(LanceFileVersion::V2_0);
// Storage versions at or above 2.1 use structural encoding, which is what applies
// Lance's compressive encodings. Not `Stable`: that resolves to the default version for
// new datasets, 2.1, rather than to the newest stable one, which is 2.2.
let write_params = WriteParams::with_storage_version(LanceFileVersion::V2_2);
Dataset::write(reader_iter, path_str, Some(write_params)).await?;

let elapsed = start.elapsed();
Expand Down
3 changes: 2 additions & 1 deletion scripts/compress-split.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def main() -> None:
parser.add_argument(
"--formats",
default="arrow-ipc,parquet,vortex",
help="comma-separated formats to forward to compress-bench",
help="comma-separated formats to forward to compress-bench "
"(lance requires a binary built with --features lance)",
)
parser.add_argument(
"--emit-ingest-records",
Expand Down
Loading