use of com.hazelcast.jet.sql.impl.validate.operand.NamedOperandCheckerProgram 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);
}
Aggregations