@@ -493,7 +493,7 @@ impl SchemaProvider for InformationSchemaProvider {
493493 } ;
494494
495495 Ok ( Some ( Arc :: new (
496- StreamingTable :: try_new ( table. schema ( ) . clone ( ) , vec ! [ table] ) . unwrap ( ) ,
496+ StreamingTable :: try_new ( Arc :: clone ( table. schema ( ) ) , vec ! [ table] ) . unwrap ( ) ,
497497 ) ) )
498498 }
499499
@@ -526,7 +526,7 @@ impl InformationSchemaTables {
526526 schema_names : StringBuilder :: new ( ) ,
527527 table_names : StringBuilder :: new ( ) ,
528528 table_types : StringBuilder :: new ( ) ,
529- schema : self . schema . clone ( ) ,
529+ schema : Arc :: clone ( & self . schema ) ,
530530 }
531531 }
532532}
@@ -540,7 +540,7 @@ impl PartitionStream for InformationSchemaTables {
540540 let mut builder = self . builder ( ) ;
541541 let config = self . config . clone ( ) ;
542542 Box :: pin ( RecordBatchStreamAdapter :: new (
543- self . schema . clone ( ) ,
543+ Arc :: clone ( & self . schema ) ,
544544 // TODO: Stream this
545545 futures:: stream:: once ( async move {
546546 config. make_tables ( & mut builder) . await ?;
@@ -582,7 +582,7 @@ impl InformationSchemaTablesBuilder {
582582
583583 fn finish ( & mut self ) -> RecordBatch {
584584 RecordBatch :: try_new (
585- self . schema . clone ( ) ,
585+ Arc :: clone ( & self . schema ) ,
586586 vec ! [
587587 Arc :: new( self . catalog_names. finish( ) ) ,
588588 Arc :: new( self . schema_names. finish( ) ) ,
@@ -618,7 +618,7 @@ impl InformationSchemaViews {
618618 schema_names : StringBuilder :: new ( ) ,
619619 table_names : StringBuilder :: new ( ) ,
620620 definitions : StringBuilder :: new ( ) ,
621- schema : self . schema . clone ( ) ,
621+ schema : Arc :: clone ( & self . schema ) ,
622622 }
623623 }
624624}
@@ -632,7 +632,7 @@ impl PartitionStream for InformationSchemaViews {
632632 let mut builder = self . builder ( ) ;
633633 let config = self . config . clone ( ) ;
634634 Box :: pin ( RecordBatchStreamAdapter :: new (
635- self . schema . clone ( ) ,
635+ Arc :: clone ( & self . schema ) ,
636636 // TODO: Stream this
637637 futures:: stream:: once ( async move {
638638 config. make_views ( & mut builder) . await ?;
@@ -670,7 +670,7 @@ impl InformationSchemaViewBuilder {
670670
671671 fn finish ( & mut self ) -> RecordBatch {
672672 RecordBatch :: try_new (
673- self . schema . clone ( ) ,
673+ Arc :: clone ( & self . schema ) ,
674674 vec ! [
675675 Arc :: new( self . catalog_names. finish( ) ) ,
676676 Arc :: new( self . schema_names. finish( ) ) ,
@@ -733,7 +733,7 @@ impl InformationSchemaColumns {
733733 numeric_scales : UInt64Builder :: with_capacity ( default_capacity) ,
734734 datetime_precisions : UInt64Builder :: with_capacity ( default_capacity) ,
735735 interval_types : StringBuilder :: new ( ) ,
736- schema : self . schema . clone ( ) ,
736+ schema : Arc :: clone ( & self . schema ) ,
737737 }
738738 }
739739}
@@ -747,7 +747,7 @@ impl PartitionStream for InformationSchemaColumns {
747747 let mut builder = self . builder ( ) ;
748748 let config = self . config . clone ( ) ;
749749 Box :: pin ( RecordBatchStreamAdapter :: new (
750- self . schema . clone ( ) ,
750+ Arc :: clone ( & self . schema ) ,
751751 // TODO: Stream this
752752 futures:: stream:: once ( async move {
753753 config. make_columns ( & mut builder) . await ?;
@@ -876,7 +876,7 @@ impl InformationSchemaColumnsBuilder {
876876
877877 fn finish ( & mut self ) -> RecordBatch {
878878 RecordBatch :: try_new (
879- self . schema . clone ( ) ,
879+ Arc :: clone ( & self . schema ) ,
880880 vec ! [
881881 Arc :: new( self . catalog_names. finish( ) ) ,
882882 Arc :: new( self . schema_names. finish( ) ) ,
@@ -921,7 +921,7 @@ impl InformationSchemata {
921921
922922 fn builder ( & self ) -> InformationSchemataBuilder {
923923 InformationSchemataBuilder {
924- schema : self . schema . clone ( ) ,
924+ schema : Arc :: clone ( & self . schema ) ,
925925 catalog_name : StringBuilder :: new ( ) ,
926926 schema_name : StringBuilder :: new ( ) ,
927927 schema_owner : StringBuilder :: new ( ) ,
@@ -967,7 +967,7 @@ impl InformationSchemataBuilder {
967967
968968 fn finish ( & mut self ) -> RecordBatch {
969969 RecordBatch :: try_new (
970- self . schema . clone ( ) ,
970+ Arc :: clone ( & self . schema ) ,
971971 vec ! [
972972 Arc :: new( self . catalog_name. finish( ) ) ,
973973 Arc :: new( self . schema_name. finish( ) ) ,
@@ -991,7 +991,7 @@ impl PartitionStream for InformationSchemata {
991991 let mut builder = self . builder ( ) ;
992992 let config = self . config . clone ( ) ;
993993 Box :: pin ( RecordBatchStreamAdapter :: new (
994- self . schema . clone ( ) ,
994+ Arc :: clone ( & self . schema ) ,
995995 // TODO: Stream this
996996 futures:: stream:: once ( async move {
997997 config. make_schemata ( & mut builder) . await ;
@@ -1023,7 +1023,7 @@ impl InformationSchemaDfSettings {
10231023 names : StringBuilder :: new ( ) ,
10241024 values : StringBuilder :: new ( ) ,
10251025 descriptions : StringBuilder :: new ( ) ,
1026- schema : self . schema . clone ( ) ,
1026+ schema : Arc :: clone ( & self . schema ) ,
10271027 }
10281028 }
10291029}
@@ -1037,7 +1037,7 @@ impl PartitionStream for InformationSchemaDfSettings {
10371037 let config = self . config . clone ( ) ;
10381038 let mut builder = self . builder ( ) ;
10391039 Box :: pin ( RecordBatchStreamAdapter :: new (
1040- self . schema . clone ( ) ,
1040+ Arc :: clone ( & self . schema ) ,
10411041 // TODO: Stream this
10421042 futures:: stream:: once ( async move {
10431043 // create a mem table with the names of tables
@@ -1064,7 +1064,7 @@ impl InformationSchemaDfSettingsBuilder {
10641064
10651065 fn finish ( & mut self ) -> RecordBatch {
10661066 RecordBatch :: try_new (
1067- self . schema . clone ( ) ,
1067+ Arc :: clone ( & self . schema ) ,
10681068 vec ! [
10691069 Arc :: new( self . names. finish( ) ) ,
10701070 Arc :: new( self . values. finish( ) ) ,
@@ -1102,7 +1102,7 @@ impl InformationSchemaRoutines {
11021102
11031103 fn builder ( & self ) -> InformationSchemaRoutinesBuilder {
11041104 InformationSchemaRoutinesBuilder {
1105- schema : self . schema . clone ( ) ,
1105+ schema : Arc :: clone ( & self . schema ) ,
11061106 specific_catalog : StringBuilder :: new ( ) ,
11071107 specific_schema : StringBuilder :: new ( ) ,
11081108 specific_name : StringBuilder :: new ( ) ,
@@ -1161,7 +1161,7 @@ impl InformationSchemaRoutinesBuilder {
11611161
11621162 fn finish ( & mut self ) -> RecordBatch {
11631163 RecordBatch :: try_new (
1164- self . schema . clone ( ) ,
1164+ Arc :: clone ( & self . schema ) ,
11651165 vec ! [
11661166 Arc :: new( self . specific_catalog. finish( ) ) ,
11671167 Arc :: new( self . specific_schema. finish( ) ) ,
@@ -1189,7 +1189,7 @@ impl PartitionStream for InformationSchemaRoutines {
11891189 let config = self . config . clone ( ) ;
11901190 let mut builder = self . builder ( ) ;
11911191 Box :: pin ( RecordBatchStreamAdapter :: new (
1192- self . schema . clone ( ) ,
1192+ Arc :: clone ( & self . schema ) ,
11931193 futures:: stream:: once ( async move {
11941194 config. make_routines (
11951195 ctx. scalar_functions ( ) ,
@@ -1229,7 +1229,7 @@ impl InformationSchemaParameters {
12291229
12301230 fn builder ( & self ) -> InformationSchemaParametersBuilder {
12311231 InformationSchemaParametersBuilder {
1232- schema : self . schema . clone ( ) ,
1232+ schema : Arc :: clone ( & self . schema ) ,
12331233 specific_catalog : StringBuilder :: new ( ) ,
12341234 specific_schema : StringBuilder :: new ( ) ,
12351235 specific_name : StringBuilder :: new ( ) ,
@@ -1295,7 +1295,7 @@ impl InformationSchemaParametersBuilder {
12951295
12961296 fn finish ( & mut self ) -> RecordBatch {
12971297 RecordBatch :: try_new (
1298- self . schema . clone ( ) ,
1298+ Arc :: clone ( & self . schema ) ,
12991299 vec ! [
13001300 Arc :: new( self . specific_catalog. finish( ) ) ,
13011301 Arc :: new( self . specific_schema. finish( ) ) ,
@@ -1321,7 +1321,7 @@ impl PartitionStream for InformationSchemaParameters {
13211321 let config = self . config . clone ( ) ;
13221322 let mut builder = self . builder ( ) ;
13231323 Box :: pin ( RecordBatchStreamAdapter :: new (
1324- self . schema . clone ( ) ,
1324+ Arc :: clone ( & self . schema ) ,
13251325 futures:: stream:: once ( async move {
13261326 config. make_parameters (
13271327 ctx. scalar_functions ( ) ,
0 commit comments