File tree Expand file tree Collapse file tree
crates/datafusion-app/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -777,15 +777,6 @@ pub fn analyze_metrics_schema() -> SchemaRef {
777777 ] ) )
778778}
779779
780- /// Standard Arrow schema for queries batch
781- fn queries_schema ( ) -> SchemaRef {
782- Arc :: new ( Schema :: new ( vec ! [ Field :: new(
783- "query" ,
784- DataType :: Utf8 ,
785- false ,
786- ) ] ) )
787- }
788-
789780/// Helper to build metrics table rows
790781struct MetricsTableBuilder {
791782 metric_names : Vec < String > ,
@@ -849,21 +840,7 @@ impl MetricsTableBuilder {
849840 }
850841}
851842
852- /// Create a queries batch from a list of queries
853- pub fn create_queries_batch ( queries : Vec < String > ) -> color_eyre:: Result < RecordBatch > {
854- let schema = queries_schema ( ) ;
855- let query_array: ArrayRef = Arc :: new ( StringArray :: from ( queries) ) ;
856- Ok ( RecordBatch :: try_new ( schema, vec ! [ query_array] ) ?)
857- }
858-
859843impl ExecutionStats {
860- /// Get raw metrics batches (for --analyze-raw)
861- pub fn to_raw_batches ( & self ) -> color_eyre:: Result < ( RecordBatch , RecordBatch ) > {
862- let queries_batch = create_queries_batch ( vec ! [ self . query. clone( ) ] ) ?;
863- let metrics_batch = self . to_metrics_table ( ) ?;
864- Ok ( ( queries_batch, metrics_batch) )
865- }
866-
867844 /// Serialize ExecutionStats to metrics table format
868845 pub fn to_metrics_table ( & self ) -> color_eyre:: Result < RecordBatch > {
869846 let schema = analyze_metrics_schema ( ) ;
Original file line number Diff line number Diff line change @@ -612,7 +612,7 @@ impl CliApp {
612612 #[ cfg( feature = "flightsql" ) ]
613613 fn print_batch ( & self , batch : & datafusion:: arrow:: array:: RecordBatch ) -> Result < ( ) > {
614614 use datafusion:: arrow:: util:: pretty:: print_batches;
615- print_batches ( & [ batch . clone ( ) ] ) ?;
615+ print_batches ( std :: slice :: from_ref ( batch ) ) ?;
616616 Ok ( ( ) )
617617 }
618618
You can’t perform that action at this time.
0 commit comments