Search in sources :

Example 1 with HazelcastReturnTypeInference

use of com.hazelcast.jet.sql.impl.validate.operators.typeinference.HazelcastReturnTypeInference in project hazelcast by hazelcast.

the class HazelcastSqlOperatorTableTest method testReturnTypeInference.

@Test
public void testReturnTypeInference() {
    for (SqlOperator operator : HazelcastSqlOperatorTable.instance().getOperatorList()) {
        if (operator instanceof HazelcastTableFunction || operator instanceof HazelcastWindowTableFunction || operator == HazelcastSqlOperatorTable.IN || operator == HazelcastSqlOperatorTable.NOT_IN || operator == HazelcastSqlOperatorTable.UNION || operator == HazelcastSqlOperatorTable.UNION_ALL || operator == HazelcastSqlOperatorTable.ARGUMENT_ASSIGNMENT) {
            continue;
        }
        boolean valid = operator.getReturnTypeInference() instanceof HazelcastReturnTypeInference;
        assertTrue("Operator must have " + HazelcastReturnTypeInference.class.getSimpleName() + ": " + 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) HazelcastReturnTypeInference(com.hazelcast.jet.sql.impl.validate.operators.typeinference.HazelcastReturnTypeInference) 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 HazelcastReturnTypeInference (com.hazelcast.jet.sql.impl.validate.operators.typeinference.HazelcastReturnTypeInference)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