presto-main/src/main/java/io/prestosql/sql/ExpressionUtils.java/ExpressionUtils/extractPredicates
class ExpressionUtils:    public static List<Expression> extractPredicates(LogicalBinaryExpression.Operator operator, Expression expression)
    {
        if (expression instanceof LogicalBinaryExpression && ((LogicalBinaryExpression) expression).getOperator() == operator) {
            LogicalBinaryExpression logicalBinaryExpression = (LogicalBinaryExpression) expression;
            return ImmutableList.<Expression>builder()
                    .addAll(extractPredicates(operator, logicalBinaryExpression.getLeft()))
                    .addAll(extractPredicates(operator, logicalBinaryExpression.getRight()))
                    .build();
        }

        return ImmutableList.of(expression);
    }