diff --git a/benchmarks/compress-bench/README.md b/benchmarks/compress-bench/README.md index d309a2122f1..48375b2397a 100644 --- a/benchmarks/compress-bench/README.md +++ b/benchmarks/compress-bench/README.md @@ -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 diff --git a/benchmarks/lance-bench/src/compress.rs b/benchmarks/lance-bench/src/compress.rs index d21e0462feb..d47d7162b14 100644 --- a/benchmarks/lance-bench/src/compress.rs +++ b/benchmarks/lance-bench/src/compress.rs @@ -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(); diff --git a/scripts/compress-split.py b/scripts/compress-split.py index e216ff52bcf..0bba221f83b 100755 --- a/scripts/compress-split.py +++ b/scripts/compress-split.py @@ -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",