use of com.hazelcast.jet.sql.impl.aggregate.function.ImposeOrderFunction in project hazelcast by hazelcast.
the class HazelcastSqlValidator method countOrderingFunctions.
private static int countOrderingFunctions(SqlNode node) {
class OrderingFunctionCounter extends SqlBasicVisitor<Void> {
int count;
@Override
public Void visit(SqlCall call) {
SqlOperator operator = call.getOperator();
if (operator instanceof ImposeOrderFunction) {
count++;
}
return super.visit(call);
}
}
OrderingFunctionCounter counter = new OrderingFunctionCounter();
node.accept(counter);
return counter.count;
}
Aggregations