presto-main/src/main/java/io/prestosql/sql/planner/RelationPlanner.java/RelationPlanner/getLateral
class RelationPlanner:    private Optional<Lateral> getLateral(Relation relation)
    {
        if (relation instanceof AliasedRelation) {
            return getLateral(((AliasedRelation) relation).getRelation());
        }
        if (relation instanceof Lateral) {
            return Optional.of((Lateral) relation);
        }
        return Optional.empty();
    }