Ejemplo n.º 1
0
        public override void VisitColumnReference(ColumnReference columnReference)
        {
            var identifiers = columnReference.Identifiers;

            identifiers = MemberUtils.RemoveAlias(_previousStage, identifiers);

            Expression expression;

            if (_inAggregateFunction)
            {
                expression = MemberUtils.GetMemberGroupByInValue(_previousStage, identifiers, _visitorMetadata.OperationsProvider, out var property);
                AddUsedProperty(property);
            }
            else
            {
                expression = MemberUtils.GetMemberGroupByInKey(_previousStage, identifiers, _visitorMetadata.OperationsProvider, out var property);
                AddUsedProperty(property);
            }

            AddExpressionToStack(expression);
            AddNameToStack(string.Join(".", identifiers));
        }