use of org.apache.calcite.sql.SqlSyntax in project flink by apache.
the class FunctionCatalogOperatorTable method lookupOperatorOverloads.
@Override
public void lookupOperatorOverloads(SqlIdentifier opName, SqlFunctionCategory category, SqlSyntax syntax, List<SqlOperator> operatorList, SqlNameMatcher nameMatcher) {
if (opName.isStar()) {
return;
}
final UnresolvedIdentifier identifier = UnresolvedIdentifier.of(opName.names);
functionCatalog.lookupFunction(identifier).flatMap(resolvedFunction -> convertToSqlFunction(category, resolvedFunction)).ifPresent(operatorList::add);
}
use of org.apache.calcite.sql.SqlSyntax in project hazelcast by hazelcast.
the class HazelcastSqlOperatorTableTest method testNoOverride.
/**
* Make sure there are no overrides for operators defined in the operator table.
*/
@Test
public void testNoOverride() {
Map<BiTuple<String, SqlSyntax>, SqlOperator> map = new HashMap<>();
for (SqlOperator operator : HazelcastSqlOperatorTable.instance().getOperatorList()) {
BiTuple<String, SqlSyntax> key = BiTuple.of(operator.getName(), operator.getSyntax());
SqlOperator oldOperator = map.put(key, operator);
assertNull("Duplicate operator \"" + operator.getName(), oldOperator);
}
}
Aggregations