@@ -23,11 +23,11 @@ use std::sync::Arc;
2323
2424use arrow_arith:: boolean:: { and, or} ;
2525use arrow_array:: builder:: { BinaryBuilder , StringBuilder } ;
26- use arrow_array:: { ArrayRef , RecordBatch , Scalar , StringArray } ;
26+ use arrow_array:: { ArrayRef , RecordBatch , StringArray } ;
2727use arrow_ord:: cmp:: eq;
2828use arrow_schema:: { DataType , Field , Schema , SchemaRef } ;
2929use arrow_select:: { filter:: filter_record_batch, take:: take} ;
30- use arrow_string:: like:: like_utf8_scalar ;
30+ use arrow_string:: like:: like ;
3131use once_cell:: sync:: Lazy ;
3232
3333use super :: lexsort_to_indices;
@@ -184,16 +184,13 @@ impl GetTablesBuilder {
184184 let mut filters = vec ! [ ] ;
185185
186186 if let Some ( catalog_filter_name) = catalog_filter {
187- let scalar = StringArray :: from_iter_values ( [ catalog_filter_name] ) ;
188- filters. push ( eq ( & catalog_name, & Scalar :: new ( & scalar) ) ?) ;
187+ let scalar = StringArray :: new_scalar ( catalog_filter_name) ;
188+ filters. push ( eq ( & catalog_name, & scalar) ?) ;
189189 }
190190
191191 let tt_filter = table_types_filter
192192 . into_iter ( )
193- . map ( |tt| {
194- let scalar = StringArray :: from_iter_values ( [ tt] ) ;
195- eq ( & table_type, & Scalar :: new ( & scalar) )
196- } )
193+ . map ( |tt| eq ( & table_type, & StringArray :: new_scalar ( tt) ) )
197194 . collect :: < std:: result:: Result < Vec < _ > , _ > > ( ) ?
198195 . into_iter ( )
199196 // We know the arrays are of same length as they are produced fromn the same root array
@@ -204,15 +201,14 @@ impl GetTablesBuilder {
204201
205202 if let Some ( db_schema_filter_pattern) = db_schema_filter_pattern {
206203 // use like kernel to get wildcard matching
207- filters. push ( like_utf8_scalar (
208- & db_schema_name,
209- & db_schema_filter_pattern,
210- ) ?)
204+ let scalar = StringArray :: new_scalar ( db_schema_filter_pattern) ;
205+ filters. push ( like ( & db_schema_name, & scalar) ?)
211206 }
212207
213208 if let Some ( table_name_filter_pattern) = table_name_filter_pattern {
214209 // use like kernel to get wildcard matching
215- filters. push ( like_utf8_scalar ( & table_name, & table_name_filter_pattern) ?)
210+ let scalar = StringArray :: new_scalar ( table_name_filter_pattern) ;
211+ filters. push ( like ( & table_name, & scalar) ?)
216212 }
217213
218214 let batch = if let Some ( table_schema) = table_schema {
0 commit comments