Skip to content

Commit 5d55fbc

Browse files
authored
Make sure both pushdown features are always enabled for DF benchmarks (#8507)
## Summary I've realized that there are two code paths for `VortexFormat` in the benchmarks, so just making sure they always have the same config so we can all sleep better at night. Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent 575db9c commit 5d55fbc

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

  • benchmarks/datafusion-bench/src

benchmarks/datafusion-bench/src/lib.rs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ pub fn get_session_context() -> SessionContext {
4545
.build_arc()
4646
.expect("could not build runtime environment");
4747

48-
let factory = VortexFormatFactory::new().with_options(VortexTableOptions {
49-
projection_pushdown: true,
50-
..Default::default()
51-
});
48+
let factory = VortexFormatFactory::new().with_options(vortex_table_options());
5249

5350
let mut session_state_builder = SessionStateBuilder::new()
5451
.with_config(SessionConfig::from_env().expect("shouldn't fail"))
@@ -114,11 +111,20 @@ pub fn format_to_df_format(format: Format) -> Arc<dyn FileFormat> {
114111
Format::Csv => Arc::new(CsvFormat::default()) as _,
115112
Format::Arrow => Arc::new(ArrowFormat),
116113
Format::Parquet => Arc::new(ParquetFormat::new()),
117-
Format::OnDiskVortex | Format::VortexCompact => {
118-
Arc::new(VortexFormat::new(SESSION.clone()))
119-
}
114+
Format::OnDiskVortex | Format::VortexCompact => Arc::new(VortexFormat::new_with_options(
115+
SESSION.clone(),
116+
vortex_table_options(),
117+
)),
120118
Format::OnDiskDuckDB | Format::Lance => {
121119
unimplemented!("Format {format} cannot be turned into a DataFusion `FileFormat`")
122120
}
123121
}
124122
}
123+
124+
fn vortex_table_options() -> VortexTableOptions {
125+
VortexTableOptions {
126+
projection_pushdown: true,
127+
predicate_pushdown: true,
128+
..Default::default()
129+
}
130+
}

0 commit comments

Comments
 (0)