@@ -310,7 +310,10 @@ impl Connection for DummyConnection {
310310 Ok ( ( ) )
311311 }
312312
313- fn get_info ( & self , _codes : Option < HashSet < InfoCode > > ) -> Result < impl RecordBatchReader > {
313+ fn get_info (
314+ & self ,
315+ _codes : Option < HashSet < InfoCode > > ,
316+ ) -> Result < Box < dyn RecordBatchReader + Send + ' static > > {
314317 let string_value_array = StringArray :: from ( vec ! [ "MyVendorName" ] ) ;
315318 let bool_value_array = BooleanArray :: from ( vec ! [ true ] ) ;
316319 let int64_value_array = Int64Array :: from ( vec ! [ 42 ] ) ;
@@ -407,7 +410,7 @@ impl Connection for DummyConnection {
407410 vec ! [ Arc :: new( name_array) , Arc :: new( value_array) ] ,
408411 ) ?;
409412 let reader = SingleBatchReader :: new ( batch) ;
410- Ok ( reader)
413+ Ok ( Box :: new ( reader) )
411414 }
412415
413416 fn get_objects (
@@ -418,7 +421,7 @@ impl Connection for DummyConnection {
418421 _table_name : Option < & str > ,
419422 _table_type : Option < Vec < & str > > ,
420423 _column_name : Option < & str > ,
421- ) -> Result < impl RecordBatchReader + Send + ' _ > {
424+ ) -> Result < Box < dyn RecordBatchReader + Send + ' static > > {
422425 let constraint_column_usage_array_inner = StructArray :: from ( vec ! [
423426 (
424427 Arc :: new( Field :: new( "fk_catalog" , DataType :: Utf8 , true ) ) ,
@@ -645,7 +648,7 @@ impl Connection for DummyConnection {
645648 ] ,
646649 ) ?;
647650 let reader = SingleBatchReader :: new ( batch) ;
648- Ok ( reader)
651+ Ok ( Box :: new ( reader) )
649652 }
650653
651654 fn get_statistics (
@@ -654,7 +657,7 @@ impl Connection for DummyConnection {
654657 _db_schema : Option < & str > ,
655658 _table_name : Option < & str > ,
656659 _approximate : bool ,
657- ) -> Result < impl RecordBatchReader + Send + ' _ > {
660+ ) -> Result < Box < dyn RecordBatchReader + Send + ' static > > {
658661 let statistic_value_int64_array = Int64Array :: from ( Vec :: < i64 > :: new ( ) ) ;
659662 let statistic_value_uint64_array = UInt64Array :: from ( vec ! [ 42 ] ) ;
660663 let statistic_value_float64_array = Float64Array :: from ( Vec :: < f64 > :: new ( ) ) ;
@@ -759,18 +762,18 @@ impl Connection for DummyConnection {
759762 ) ?;
760763
761764 let reader = SingleBatchReader :: new ( batch) ;
762- Ok ( reader)
765+ Ok ( Box :: new ( reader) )
763766 }
764767
765- fn get_statistic_names ( & self ) -> Result < impl RecordBatchReader + Send + ' _ > {
768+ fn get_statistic_names ( & self ) -> Result < Box < dyn RecordBatchReader + Send + ' static > > {
766769 let name_array = StringArray :: from ( vec ! [ "sum" , "min" , "max" ] ) ;
767770 let key_array = Int16Array :: from ( vec ! [ 0 , 1 , 2 ] ) ;
768771 let batch = RecordBatch :: try_new (
769772 schemas:: GET_STATISTIC_NAMES_SCHEMA . clone ( ) ,
770773 vec ! [ Arc :: new( name_array) , Arc :: new( key_array) ] ,
771774 ) ?;
772775 let reader = SingleBatchReader :: new ( batch) ;
773- Ok ( reader)
776+ Ok ( Box :: new ( reader) )
774777 }
775778
776779 fn get_table_schema (
@@ -792,20 +795,20 @@ impl Connection for DummyConnection {
792795 }
793796 }
794797
795- fn get_table_types ( & self ) -> Result < impl RecordBatchReader + Send + ' _ > {
798+ fn get_table_types ( & self ) -> Result < Box < dyn RecordBatchReader + Send + ' static > > {
796799 let array = Arc :: new ( StringArray :: from ( vec ! [ "table" , "view" ] ) ) ;
797800 let batch = RecordBatch :: try_new ( schemas:: GET_TABLE_TYPES_SCHEMA . clone ( ) , vec ! [ array] ) ?;
798801 let reader = SingleBatchReader :: new ( batch) ;
799- Ok ( reader)
802+ Ok ( Box :: new ( reader) )
800803 }
801804
802805 fn read_partition (
803806 & self ,
804807 _partition : impl AsRef < [ u8 ] > ,
805- ) -> Result < impl RecordBatchReader + Send + ' _ > {
808+ ) -> Result < Box < dyn RecordBatchReader + Send + ' static > > {
806809 let batch = get_table_data ( ) ;
807810 let reader = SingleBatchReader :: new ( batch) ;
808- Ok ( reader)
811+ Ok ( Box :: new ( reader) )
809812 }
810813
811814 fn rollback ( & mut self ) -> Result < ( ) > {
@@ -855,11 +858,11 @@ impl Statement for DummyStatement {
855858 Ok ( ( ) )
856859 }
857860
858- fn execute ( & mut self ) -> Result < impl RecordBatchReader + Send + ' _ > {
861+ fn execute ( & mut self ) -> Result < Box < dyn RecordBatchReader + Send + ' static > > {
859862 maybe_panic ( "StatementExecuteQuery" ) ;
860863 let batch = get_table_data ( ) ;
861864 let reader = SingleBatchReader :: new ( batch) ;
862- Ok ( reader)
865+ Ok ( Box :: new ( reader) )
863866 }
864867
865868 fn execute_partitions ( & mut self ) -> Result < PartitionedResult > {
0 commit comments