File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
vortex-datafusion/src/persistent Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -415,7 +415,7 @@ mod tests {
415415
416416 use super :: * ;
417417
418- static SESSION : LazyLock < VortexSession > = LazyLock :: new ( || VortexSession :: default ( ) ) ;
418+ static SESSION : LazyLock < VortexSession > = LazyLock :: new ( VortexSession :: default) ;
419419
420420 #[ rstest]
421421 #[ case( 0 ..100 , 100 , 100 , 0 ..100 ) ]
Original file line number Diff line number Diff line change @@ -56,6 +56,17 @@ pub trait WriteOptionsSessionExt: SessionExt {
5656impl < S : SessionExt > WriteOptionsSessionExt for S { }
5757
5858impl VortexWriteOptions {
59+ /// Create a new [`VortexWriteOptions`] with the given session.
60+ pub fn new ( session : VortexSession ) -> Self {
61+ VortexWriteOptions {
62+ session,
63+ strategy : WriteStrategyBuilder :: new ( ) . build ( ) ,
64+ exclude_dtype : false ,
65+ file_statistics : PRUNING_STATS . to_vec ( ) ,
66+ max_variable_length_statistics_size : 64 ,
67+ }
68+ }
69+
5970 /// Replace the default layout strategy with the provided one.
6071 pub fn with_strategy ( mut self , strategy : Arc < dyn LayoutStrategy > ) -> Self {
6172 self . strategy = strategy;
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ impl GpuScan<ArrayRef> {
3535 ) -> VortexResult < impl ArrayIterator + ' static > {
3636 let dtype = self . dtype . clone ( ) ;
3737 let stream = self . execute_stream ( ) ?;
38- let iter = runtime. block_on_stream ( move |_h| stream) ;
38+ let iter = runtime. block_on_stream ( stream) ;
3939 Ok ( ArrayIteratorAdapter :: new ( dtype, iter) )
4040 }
4141
You can’t perform that action at this time.
0 commit comments