use of com.hazelcast.jet.sql.impl.validate.operand.OperandChecker in project hazelcast by hazelcast.
the class HazelcastSqlOperandMetadata method checkOperandTypes.
@Override
public final boolean checkOperandTypes(SqlCallBinding callBinding, boolean throwOnFailure) {
HazelcastCallBinding binding = prepareBinding(callBinding, operandTypeInference);
boolean checkResult;
if (ValidationUtil.hasAssignment(binding.getCall())) {
OperandChecker[] checkers = parameters.stream().map(HazelcastTableFunctionParameter::checker).toArray(OperandChecker[]::new);
checkResult = new NamedOperandCheckerProgram(checkers).check(binding, throwOnFailure);
} else {
OperandChecker[] checkers = parameters.stream().limit(binding.getOperandCount()).map(HazelcastTableFunctionParameter::checker).toArray(OperandChecker[]::new);
checkResult = new OperandCheckerProgram(checkers).check(binding, throwOnFailure);
}
return checkResult && checkOperandTypes(binding, throwOnFailure);
}
use of com.hazelcast.jet.sql.impl.validate.operand.OperandChecker in project hazelcast by hazelcast.
the class HazelcastAndOrPredicate method checkOperandTypes.
@Override
public boolean checkOperandTypes(HazelcastCallBinding binding, boolean throwOnFailure) {
OperandChecker[] checkers = new OperandChecker[binding.getOperandCount()];
Arrays.fill(checkers, TypedOperandChecker.BOOLEAN);
return new OperandCheckerProgram(checkers).check(binding, throwOnFailure);
}
Aggregations