Search in sources :

Example 1 with NumericPrecedenceParameterConverter

use of com.hazelcast.jet.sql.impl.validate.param.NumericPrecedenceParameterConverter in project hazelcast by hazelcast.

the class HazelcastBetweenOperator method setNumericParameterConverter.

private void setNumericParameterConverter(HazelcastSqlValidator validator, SqlNode node, QueryDataType type) {
    if (node.getKind() == SqlKind.DYNAMIC_PARAM) {
        SqlDynamicParam node0 = (SqlDynamicParam) node;
        ParameterConverter converter = new NumericPrecedenceParameterConverter(node0.getIndex(), node.getParserPosition(), type);
        validator.setParameterConverter(node0.getIndex(), converter);
    }
}
Also used : SqlDynamicParam(org.apache.calcite.sql.SqlDynamicParam) NumericPrecedenceParameterConverter(com.hazelcast.jet.sql.impl.validate.param.NumericPrecedenceParameterConverter) ParameterConverter(com.hazelcast.sql.impl.ParameterConverter) NumericPrecedenceParameterConverter(com.hazelcast.jet.sql.impl.validate.param.NumericPrecedenceParameterConverter)

Example 2 with NumericPrecedenceParameterConverter

use of com.hazelcast.jet.sql.impl.validate.param.NumericPrecedenceParameterConverter in project hazelcast by hazelcast.

the class HazelcastComparisonPredicateUtils method setNumericParameterConverter.

private static void setNumericParameterConverter(HazelcastSqlValidator validator, SqlNode node, QueryDataType type) {
    if (node.getKind() == SqlKind.DYNAMIC_PARAM) {
        SqlDynamicParam node0 = (SqlDynamicParam) node;
        ParameterConverter converter = new NumericPrecedenceParameterConverter(node0.getIndex(), node.getParserPosition(), type);
        validator.setParameterConverter(node0.getIndex(), converter);
    }
}
Also used : SqlDynamicParam(org.apache.calcite.sql.SqlDynamicParam) NumericPrecedenceParameterConverter(com.hazelcast.jet.sql.impl.validate.param.NumericPrecedenceParameterConverter) ParameterConverter(com.hazelcast.sql.impl.ParameterConverter) NumericPrecedenceParameterConverter(com.hazelcast.jet.sql.impl.validate.param.NumericPrecedenceParameterConverter)

Aggregations

NumericPrecedenceParameterConverter (com.hazelcast.jet.sql.impl.validate.param.NumericPrecedenceParameterConverter)2 ParameterConverter (com.hazelcast.sql.impl.ParameterConverter)2 SqlDynamicParam (org.apache.calcite.sql.SqlDynamicParam)2