Skip to content

Commit

Permalink
Follow up for 537 (#538)
Browse files Browse the repository at this point in the history
Fix a couple of issues I missed in #537 - had to flip values for some
benchmark and add a hand-rolled `Default` implementation as noted by
@a10y
  • Loading branch information
AdamGS authored Aug 2, 2024
1 parent 89e918b commit 4f4d2cc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 4 additions & 4 deletions bench-vortex/benches/datafusion_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,31 +177,31 @@ fn bench_datafusion(c: &mut Criterion) {
bench_vortex(
c.benchmark_group("vortex-pushdown-compressed"),
&SessionContext::new(),
false,
true,
true,
);

// compress=false, pushdown enabled
bench_vortex(
c.benchmark_group("vortex-pushdown-uncompressed"),
&SessionContext::new(),
false,
true,
false,
);

// compress=true, pushdown disabled
bench_vortex(
c.benchmark_group("vortex-nopushdown-compressed"),
&SessionContext::new(),
true,
false,
true,
);

// compress=false, pushdown disabled
bench_vortex(
c.benchmark_group("vortex-nopushdown-uncompressed"),
&SessionContext::new(),
true,
false,
false,
);
}
Expand Down
10 changes: 9 additions & 1 deletion vortex-datafusion/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,19 @@ const SUPPORTED_BINARY_OPS: &[Operator] = &[
];

/// Optional configurations to pass when loading a [VortexMemTable].
#[derive(Default, Debug, Clone)]
#[derive(Debug, Clone)]
pub struct VortexMemTableOptions {
pub enable_pushdown: bool,
}

impl Default for VortexMemTableOptions {
fn default() -> Self {
Self {
enable_pushdown: true,
}
}
}

impl VortexMemTableOptions {
pub fn with_pushdown(mut self, enable_pushdown: bool) -> Self {
self.enable_pushdown = enable_pushdown;
Expand Down

0 comments on commit 4f4d2cc

Please sign in to comment.