private RexNode simplifyCast(RexCall e) { RexNode operand = e.getOperands().get(0); operand = simplify(operand, UNKNOWN); if (sameTypeOrNarrowsNullability(e.getType(), operand.getType())) { return operand;
if (sameTypeOrNarrowsNullability(caseType, value.getType())) { return value; } else { final RexNode result = simplifyBooleanCase(rexBuilder, branches, unknownAs, caseType); if (result != null) { if (sameTypeOrNarrowsNullability(caseType, result.getType())) { return simplify(result, unknownAs); } else {