@@ -32,7 +32,6 @@ use crate::memory::plans::{RowSelectorExec, TakeRowsExec};
3232pub struct VortexMemTable {
3333 array : ChunkedArray ,
3434 schema_ref : SchemaRef ,
35- options : VortexMemTableOptions ,
3635}
3736
3837impl VortexMemTable {
@@ -41,7 +40,7 @@ impl VortexMemTable {
4140 /// # Panics
4241 ///
4342 /// Creation will panic if the provided array is not of `DType::Struct` type.
44- pub fn new ( array : ArrayData , options : VortexMemTableOptions ) -> Self {
43+ pub fn new ( array : ArrayData ) -> Self {
4544 let arrow_schema = infer_schema ( array. dtype ( ) ) . vortex_expect ( "schema is inferable" ) ;
4645 let schema_ref = SchemaRef :: new ( arrow_schema) ;
4746
@@ -54,11 +53,7 @@ impl VortexMemTable {
5453 }
5554 } ;
5655
57- Self {
58- array,
59- schema_ref,
60- options,
61- }
56+ Self { array, schema_ref }
6257 }
6358}
6459
@@ -141,15 +136,6 @@ impl TableProvider for VortexMemTable {
141136 & self ,
142137 filters : & [ & Expr ] ,
143138 ) -> DFResult < Vec < TableProviderFilterPushDown > > {
144- // In the case the caller has configured this provider with filter pushdown disabled,
145- // do not attempt to apply any filters at scan time.
146- if !self . options . enable_pushdown {
147- return Ok ( filters
148- . iter ( )
149- . map ( |_| TableProviderFilterPushDown :: Unsupported )
150- . collect ( ) ) ;
151- }
152-
153139 filters
154140 . iter ( )
155141 . map ( |expr| {
@@ -163,27 +149,6 @@ impl TableProvider for VortexMemTable {
163149 }
164150}
165151
166- /// Optional configurations to pass when loading a [VortexMemTable].
167- #[ derive( Debug , Clone ) ]
168- pub struct VortexMemTableOptions {
169- pub enable_pushdown : bool ,
170- }
171-
172- impl Default for VortexMemTableOptions {
173- fn default ( ) -> Self {
174- Self {
175- enable_pushdown : true ,
176- }
177- }
178- }
179-
180- impl VortexMemTableOptions {
181- pub fn with_pushdown ( mut self , enable_pushdown : bool ) -> Self {
182- self . enable_pushdown = enable_pushdown;
183- self
184- }
185- }
186-
187152/// Construct an operator plan that executes in two stages.
188153///
189154/// The first plan stage only materializes the columns related to the provided set of filter
@@ -220,7 +185,6 @@ mod test {
220185 use vortex_array:: array:: { PrimitiveArray , StructArray , VarBinViewArray } ;
221186 use vortex_array:: { ArrayData , IntoArrayData } ;
222187
223- use crate :: memory:: VortexMemTableOptions ;
224188 use crate :: { can_be_pushed_down, SessionContextExt as _} ;
225189
226190 fn presidents_array ( ) -> ArrayData {
@@ -271,44 +235,6 @@ mod test {
271235 ) ;
272236 }
273237
274- #[ tokio:: test]
275- #[ cfg_attr( miri, ignore) ]
276- async fn test_datafusion_no_pushdown ( ) {
277- let ctx = SessionContext :: new ( ) ;
278-
279- let df = ctx
280- . read_mem_vortex_opts (
281- presidents_array ( ) ,
282- // Disable pushdown. We run this test to make sure that the naive codepath also
283- // produces correct results and does not panic anywhere.
284- VortexMemTableOptions :: default ( ) . with_pushdown ( false ) ,
285- )
286- . unwrap ( ) ;
287-
288- let distinct_names = df
289- . filter ( col ( "term_start" ) . gt_eq ( lit ( 1795 ) ) )
290- . unwrap ( )
291- . filter ( col ( "term_start" ) . lt ( lit ( 2000 ) ) )
292- . unwrap ( )
293- . aggregate ( vec ! [ ] , vec ! [ count_distinct( col( "president" ) ) ] )
294- . unwrap ( )
295- . collect ( )
296- . await
297- . unwrap ( ) ;
298-
299- assert_eq ! ( distinct_names. len( ) , 1 ) ;
300-
301- assert_eq ! (
302- * distinct_names[ 0 ]
303- . column( 0 )
304- . as_primitive:: <Int64Type >( )
305- . values( )
306- . first( )
307- . unwrap( ) ,
308- 4i64
309- ) ;
310- }
311-
312238 #[ test]
313239 fn test_can_be_pushed_down0 ( ) {
314240 let e = BinaryExpr {
0 commit comments