presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/ExtractCommonPredicatesExpressionRewriter.java/Visitor/getSubPredicates
class Visitor:        private static List<List<Expression>> getSubPredicates(LogicalBinaryExpression expression)
        {
            return extractPredicates(expression.getOperator(), expression).stream()
                    .map(predicate -> predicate instanceof LogicalBinaryExpression ?
                            extractPredicates((LogicalBinaryExpression) predicate) : ImmutableList.of(predicate))
                    .collect(toImmutableList());
        }