presto-main/src/main/java/io/prestosql/sql/analyzer/AggregationAnalyzer.java/Visitor/visitDereferenceExpression
class Visitor:        @Override
        protected Boolean visitDereferenceExpression(DereferenceExpression node, Void context)
        {
            if (!hasReferencesToScope(node, analysis, sourceScope)) {
                // reference to outer scope is group-invariant
                return true;
            }

            if (columnReferences.containsKey(NodeRef.<Expression>of(node))) {
                return isGroupingKey(node);
            }

            // Allow SELECT col1.f1 FROM table1 GROUP BY col1
            return process(node.getBase(), context);
        }