public <T> T fun(Class<T> operatorTableClass, T defaultOperatorTable) { final String fun = CalciteConnectionProperty.FUN.wrap(properties).getString(); if (fun == null || fun.equals("") || fun.equals("standard")) { return defaultOperatorTable; } final Collection<SqlOperatorTable> tables = new LinkedHashSet<>(); for (String s : fun.split(",")) { operatorTable(s, tables); } tables.add(SqlStdOperatorTable.instance()); return operatorTableClass.cast( ChainedSqlOperatorTable.of( tables.toArray(new SqlOperatorTable[0]))); }
public <T> T fun(Class<T> operatorTableClass, T defaultOperatorTable) { final String fun = CalciteConnectionProperty.FUN.wrap(properties).getString(); if (fun == null || fun.equals("") || fun.equals("standard")) { return defaultOperatorTable; } final Collection<SqlOperatorTable> tables = new LinkedHashSet<>(); for (String s : fun.split(",")) { operatorTable(s, tables); } tables.add(SqlStdOperatorTable.instance()); return operatorTableClass.cast( ChainedSqlOperatorTable.of( tables.toArray(new SqlOperatorTable[0]))); }