2424import org .apache .flink .table .factories .CatalogFactory ;
2525import org .apache .flink .table .factories .FactoryUtil ;
2626
27- import java .util .Arrays ;
27+ import java .util .ArrayList ;
2828import java .util .Collections ;
29+ import java .util .List ;
2930import java .util .Map ;
3031import java .util .Set ;
31- import java .util .stream .Stream ;
3232
3333import static org .apache .fluss .config .FlussConfigUtils .CLIENT_SECURITY_PREFIX ;
3434import static org .apache .fluss .utils .PropertiesUtils .extractPrefix ;
@@ -38,6 +38,15 @@ public class FlinkCatalogFactory implements CatalogFactory {
3838
3939 public static final String IDENTIFIER = "fluss" ;
4040
41+ public static final List <String > PREFIXES_TO_SKIP_VALIDATE = new ArrayList <>();
42+
43+ static {
44+ PREFIXES_TO_SKIP_VALIDATE .add (CLIENT_SECURITY_PREFIX );
45+ for (DataLakeFormat value : DataLakeFormat .values ()) {
46+ PREFIXES_TO_SKIP_VALIDATE .add (value .toString ());
47+ }
48+ }
49+
4150 @ Override
4251 public String factoryIdentifier () {
4352 return IDENTIFIER ;
@@ -57,12 +66,7 @@ public Set<ConfigOption<?>> optionalOptions() {
5766 public FlinkCatalog createCatalog (Context context ) {
5867 final FactoryUtil .CatalogFactoryHelper helper =
5968 FactoryUtil .createCatalogFactoryHelper (this , context );
60- helper .validateExcept (
61- Stream .concat (
62- Stream .of (CLIENT_SECURITY_PREFIX ),
63- Arrays .stream (DataLakeFormat .values ())
64- .map (DataLakeFormat ::toString ))
65- .toArray (String []::new ));
69+ helper .validateExcept (PREFIXES_TO_SKIP_VALIDATE .toArray (new String [0 ]));
6670 Map <String , String > options = context .getOptions ();
6771 Map <String , String > securityConfigs = extractPrefix (options , CLIENT_SECURITY_PREFIX );
6872 Map <String , String > lakeCatalogProperties = extractPrefix (options , DataLakeFormat .class );
0 commit comments