Search in sources :

Example 1 with HazelcastOperandTypeCheckerAware

use of com.hazelcast.jet.sql.impl.validate.operators.common.HazelcastOperandTypeCheckerAware in project hazelcast by hazelcast.

the class HazelcastSqlOperatorTableTest method testOperandTypeChecker.

/**
 * Make sure that all our operators either define the top-level operand checker that overrides that call binding,
 * or confirm explicitly that they override the binding manually.
 */
@Test
public void testOperandTypeChecker() {
    for (SqlOperator operator : HazelcastSqlOperatorTable.instance().getOperatorList()) {
        boolean valid = operator instanceof HazelcastOperandTypeCheckerAware || operator instanceof HazelcastTableFunction || operator instanceof HazelcastWindowTableFunction || operator instanceof HazelcastCaseOperator || operator == HazelcastSqlOperatorTable.ARGUMENT_ASSIGNMENT;
        assertTrue("Operator must implement one of classes from " + HazelcastFunction.class.getPackage().toString() + ": " + operator.getClass().getSimpleName(), valid);
    }
}
Also used : HazelcastWindowTableFunction(com.hazelcast.jet.sql.impl.aggregate.function.HazelcastWindowTableFunction) HazelcastTableFunction(com.hazelcast.jet.sql.impl.schema.HazelcastTableFunction) SqlOperator(org.apache.calcite.sql.SqlOperator) HazelcastFunction(com.hazelcast.jet.sql.impl.validate.operators.common.HazelcastFunction) HazelcastCaseOperator(com.hazelcast.jet.sql.impl.validate.operators.misc.HazelcastCaseOperator) HazelcastOperandTypeCheckerAware(com.hazelcast.jet.sql.impl.validate.operators.common.HazelcastOperandTypeCheckerAware) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

HazelcastWindowTableFunction (com.hazelcast.jet.sql.impl.aggregate.function.HazelcastWindowTableFunction)1 HazelcastTableFunction (com.hazelcast.jet.sql.impl.schema.HazelcastTableFunction)1 HazelcastFunction (com.hazelcast.jet.sql.impl.validate.operators.common.HazelcastFunction)1 HazelcastOperandTypeCheckerAware (com.hazelcast.jet.sql.impl.validate.operators.common.HazelcastOperandTypeCheckerAware)1 HazelcastCaseOperator (com.hazelcast.jet.sql.impl.validate.operators.misc.HazelcastCaseOperator)1 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 SqlOperator (org.apache.calcite.sql.SqlOperator)1 Test (org.junit.Test)1