public boolean checkOperandTypes( SqlCallBinding callBinding, boolean throwOnFailure) { // check that the two operands are of same type. switch (callBinding.getOperandCount()) { case 2: return OperandTypes.SAME_SAME.checkOperandTypes( callBinding, throwOnFailure) && super.checkOperandTypes(callBinding, throwOnFailure); case 3: return OperandTypes.SAME_SAME_INTEGER.checkOperandTypes( callBinding, throwOnFailure) && super.checkOperandTypes(callBinding, throwOnFailure); default: throw new AssertionError(); } } }
public boolean checkOperandTypes( SqlCallBinding callBinding, boolean throwOnFailure) { // check that the two operands are of same type. switch (callBinding.getOperandCount()) { case 2: return OperandTypes.SAME_SAME.checkOperandTypes( callBinding, throwOnFailure) && super.checkOperandTypes(callBinding, throwOnFailure); case 3: return OperandTypes.SAME_SAME_INTEGER.checkOperandTypes( callBinding, throwOnFailure) && super.checkOperandTypes(callBinding, throwOnFailure); default: throw new AssertionError(); } } }
public boolean checkOperandTypes( SqlCallBinding callBinding, boolean throwOnFailure) { if (!super.checkOperandTypes(callBinding, throwOnFailure)) { return false; } switch (kind) { case TRIM: return SqlTypeUtil.isCharTypeComparable(callBinding, ImmutableList.of(callBinding.operand(1), callBinding.operand(2)), throwOnFailure); default: return true; } } }
public boolean checkOperandTypes( SqlCallBinding callBinding, boolean throwOnFailure) { if (!super.checkOperandTypes(callBinding, throwOnFailure)) { return false; } switch (kind) { case TRIM: return SqlTypeUtil.isCharTypeComparable(callBinding, ImmutableList.of(callBinding.operand(1), callBinding.operand(2)), throwOnFailure); default: return true; } } }