Skip to content

Commit b9f24ac

Browse files
committed
Only run lance when lance is available
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent 9f41fc3 commit b9f24ac

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • benchmarks/random-access-bench/src

benchmarks/random-access-bench/src/main.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,22 @@ impl DatasetArg {
152152
}
153153
}
154154

155+
const fn default_formats() -> &'static [&'static str] {
156+
if cfg!(feature = "lance") {
157+
&["parquet", "vortex", "lance"]
158+
} else {
159+
&["parquet", "vortex"]
160+
}
161+
}
162+
155163
#[derive(Parser, Debug)]
156164
#[command(version, about, long_about = None)]
157165
struct Args {
158166
#[arg(
159167
long,
160168
value_delimiter = ',',
161169
value_parser = Format::parse_allowed,
162-
default_values = ["parquet", "vortex", "lance"]
170+
default_values = default_formats()
163171
)]
164172
formats: Vec<Format>,
165173
/// Time limit in seconds for each benchmark target (e.g., 10 for 10 seconds).

0 commit comments

Comments
 (0)