From 4f4d2cc70db996b114b3adad73d27877ce730b82 Mon Sep 17 00:00:00 2001 From: Adam Gutglick Date: Fri, 2 Aug 2024 14:08:55 +0100 Subject: [PATCH] Follow up for 537 (#538) 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 --- bench-vortex/benches/datafusion_benchmark.rs | 8 ++++---- vortex-datafusion/src/lib.rs | 10 +++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/bench-vortex/benches/datafusion_benchmark.rs b/bench-vortex/benches/datafusion_benchmark.rs index 85494de987..5429781d36 100644 --- a/bench-vortex/benches/datafusion_benchmark.rs +++ b/bench-vortex/benches/datafusion_benchmark.rs @@ -177,7 +177,7 @@ fn bench_datafusion(c: &mut Criterion) { bench_vortex( c.benchmark_group("vortex-pushdown-compressed"), &SessionContext::new(), - false, + true, true, ); @@ -185,7 +185,7 @@ fn bench_datafusion(c: &mut Criterion) { bench_vortex( c.benchmark_group("vortex-pushdown-uncompressed"), &SessionContext::new(), - false, + true, false, ); @@ -193,7 +193,7 @@ fn bench_datafusion(c: &mut Criterion) { bench_vortex( c.benchmark_group("vortex-nopushdown-compressed"), &SessionContext::new(), - true, + false, true, ); @@ -201,7 +201,7 @@ fn bench_datafusion(c: &mut Criterion) { bench_vortex( c.benchmark_group("vortex-nopushdown-uncompressed"), &SessionContext::new(), - true, + false, false, ); } diff --git a/vortex-datafusion/src/lib.rs b/vortex-datafusion/src/lib.rs index 34fc60e848..d3f8e23d5a 100644 --- a/vortex-datafusion/src/lib.rs +++ b/vortex-datafusion/src/lib.rs @@ -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;