6969import java .io .IOException ;
7070import java .net .URLDecoder ;
7171import java .util .ArrayList ;
72- import java .util .Arrays ;
7372import java .util .Enumeration ;
7473import java .util .List ;
7574import java .util .Map ;
@@ -113,7 +112,7 @@ public TrinoQueryProperties(
113112 @ JsonProperty ("body" ) String body ,
114113 @ JsonProperty ("queryType" ) String queryType ,
115114 @ JsonProperty ("resourceGroupQueryType" ) String resourceGroupQueryType ,
116- @ JsonProperty ("tables" ) String [] tables ,
115+ @ JsonProperty ("tables" ) List < String > tables ,
117116 @ JsonProperty ("defaultCatalog" ) Optional <String > defaultCatalog ,
118117 @ JsonProperty ("defaultSchema" ) Optional <String > defaultSchema ,
119118 @ JsonProperty ("catalogs" ) Set <String > catalogs ,
@@ -127,7 +126,8 @@ public TrinoQueryProperties(
127126 this .body = requireNonNullElse (body , "" );
128127 this .queryType = requireNonNullElse (queryType , "" );
129128 this .resourceGroupQueryType = resourceGroupQueryType ;
130- this .tables = Arrays .stream (requireNonNullElse (tables , new String [] {})).map (this ::parseIdentifierStringToQualifiedName ).collect (Collectors .toSet ());
129+ List <String > defaultTables = ImmutableList .of ();
130+ this .tables = requireNonNullElse (tables , defaultTables ).stream ().map (this ::parseIdentifierStringToQualifiedName ).collect (Collectors .toSet ());
131131 this .defaultCatalog = requireNonNullElse (defaultCatalog , Optional .empty ());
132132 this .defaultSchema = requireNonNullElse (defaultSchema , Optional .empty ());
133133 this .catalogs = requireNonNullElse (catalogs , ImmutableSet .of ());
0 commit comments