presto-main/src/main/java/io/prestosql/sql/planner/ExpressionInterpreter.java/ExpressionInterpreter/visitComparisonExpression
class ExpressionInterpreter:        @Override
        protected Object visitComparisonExpression(ComparisonExpression node, Object context)
        {
            ComparisonExpression.Operator operator = node.getOperator();

            if (operator == ComparisonExpression.Operator.IS_DISTINCT_FROM) {
                Object left = process(node.getLeft(), context);
                Object right = process(node.getRight(), context);

                if (left == null && right instanceof Expression) {
                    return new IsNotNullPredicate((Expression) right);
                }

                if (right == null && left instanceof Expression) {
                    return new IsNotNullPredicate((Expression) left);
                }

                if (left instanceof Expression || right instanceof Expression) {
                    return new ComparisonExpression(operator, toExpression(left, type(node.getLeft())), toExpression(right, type(node.getRight())));
                }

                return invokeOperator(OperatorType.valueOf(operator.name()), types(node.getLeft(), node.getRight()), Arrays.asList(left, right));
            }

            Object left = process(node.getLeft(), context);
            if (left == null) {
                return null;
            }

            Object right = process(node.getRight(), context);
            if (right == null) {
                return null;
            }

            if (left instanceof Expression || right instanceof Expression) {
                return new ComparisonExpression(operator, toExpression(left, type(node.getLeft())), toExpression(right, type(node.getRight())));
            }

            return invokeOperator(OperatorType.valueOf(operator.name()), types(node.getLeft(), node.getRight()), ImmutableList.of(left, right));
        }