Skip to content
Merged
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
20 changes: 13 additions & 7 deletions benchmarks/datafusion-bench/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ pub fn get_session_context() -> SessionContext {
.build_arc()
.expect("could not build runtime environment");

let factory = VortexFormatFactory::new().with_options(VortexTableOptions {
projection_pushdown: true,
..Default::default()
});
let factory = VortexFormatFactory::new().with_options(vortex_table_options());

let mut session_state_builder = SessionStateBuilder::new()
.with_config(SessionConfig::from_env().expect("shouldn't fail"))
Expand Down Expand Up @@ -114,11 +111,20 @@ pub fn format_to_df_format(format: Format) -> Arc<dyn FileFormat> {
Format::Csv => Arc::new(CsvFormat::default()) as _,
Format::Arrow => Arc::new(ArrowFormat),
Format::Parquet => Arc::new(ParquetFormat::new()),
Format::OnDiskVortex | Format::VortexCompact => {
Arc::new(VortexFormat::new(SESSION.clone()))
}
Format::OnDiskVortex | Format::VortexCompact => Arc::new(VortexFormat::new_with_options(
SESSION.clone(),
vortex_table_options(),
)),
Format::OnDiskDuckDB | Format::Lance => {
unimplemented!("Format {format} cannot be turned into a DataFusion `FileFormat`")
}
}
}

fn vortex_table_options() -> VortexTableOptions {
VortexTableOptions {
projection_pushdown: true,
predicate_pushdown: true,
..Default::default()
}
}
Loading