@@ -92,10 +92,6 @@ impl DatabaseCatalog {
9292 ) ;
9393 Ok ( res)
9494 }
95-
96- pub fn is_case_insensitive_db ( db : & str ) -> bool {
97- db. to_uppercase ( ) == "INFORMATION_SCHEMA"
98- }
9995}
10096
10197#[ async_trait:: async_trait]
@@ -104,14 +100,18 @@ impl Catalog for DatabaseCatalog {
104100 self
105101 }
106102
103+ fn is_case_insensitive_db ( & self , db : & str ) -> bool {
104+ db. to_uppercase ( ) == "INFORMATION_SCHEMA"
105+ }
106+
107107 async fn get_database ( & self , tenant : & str , db_name : & str ) -> Result < Arc < dyn Database > > {
108108 if tenant. is_empty ( ) {
109109 return Err ( ErrorCode :: TenantIsEmpty (
110110 "Tenant can not empty(while get database)" ,
111111 ) ) ;
112112 }
113113
114- let db_name = if Self :: is_case_insensitive_db ( db_name) {
114+ let db_name = if self . is_case_insensitive_db ( db_name) {
115115 db_name. to_uppercase ( )
116116 } else {
117117 db_name. to_string ( )
@@ -243,7 +243,7 @@ impl Catalog for DatabaseCatalog {
243243 ) ) ;
244244 }
245245
246- let ( db_name, table_name) = if Self :: is_case_insensitive_db ( db_name) {
246+ let ( db_name, table_name) = if self . is_case_insensitive_db ( db_name) {
247247 ( db_name. to_uppercase ( ) , table_name. to_uppercase ( ) )
248248 } else {
249249 ( db_name. to_string ( ) , table_name. to_string ( ) )
@@ -274,7 +274,7 @@ impl Catalog for DatabaseCatalog {
274274 ) ) ;
275275 }
276276
277- let db_name = if Self :: is_case_insensitive_db ( db_name) {
277+ let db_name = if self . is_case_insensitive_db ( db_name) {
278278 db_name. to_uppercase ( )
279279 } else {
280280 db_name. to_string ( )
@@ -304,7 +304,7 @@ impl Catalog for DatabaseCatalog {
304304 ) ) ;
305305 }
306306
307- let db_name = if Self :: is_case_insensitive_db ( db_name) {
307+ let db_name = if self . is_case_insensitive_db ( db_name) {
308308 db_name. to_uppercase ( )
309309 } else {
310310 db_name. to_string ( )
0 commit comments