presto-parser/src/main/java/io/prestosql/sql/tree/DereferenceExpression.java/DereferenceExpression/getQualifiedName
class DereferenceExpression:    public static QualifiedName getQualifiedName(DereferenceExpression expression)
    {
        List<Identifier> parts = null;
        if (expression.base instanceof Identifier) {
            parts = ImmutableList.of((Identifier) expression.base, expression.field);
        }
        else if (expression.base instanceof DereferenceExpression) {
            QualifiedName baseQualifiedName = getQualifiedName((DereferenceExpression) expression.base);
            if (baseQualifiedName != null) {
                ImmutableList.Builder<Identifier> builder = ImmutableList.builder();
                builder.addAll(baseQualifiedName.getOriginalParts());
                builder.add(expression.field);
                parts = builder.build();
            }
        }

        return parts == null ? null : QualifiedName.of(parts);
    }