public override SqlObject Visit(SqlGroupByClause sqlGroupByClause)
        {
            SqlScalarExpression[] expressions = new SqlScalarExpression[sqlGroupByClause.Expressions.Length];
            for (int i = 0; i < sqlGroupByClause.Expressions.Length; i++)
            {
                expressions[i] = sqlGroupByClause.Expressions[i].Accept(this) as SqlScalarExpression;
            }

            return(SqlGroupByClause.Create(expressions));
        }
        public override SqlObject VisitGroup_by_clause([NotNull] sqlParser.Group_by_clauseContext context)
        {
            Contract.Requires(context != null);

            List <SqlScalarExpression> groupByColumns = new List <SqlScalarExpression>();

            foreach (sqlParser.Scalar_expressionContext scalarExpressionContext in context.scalar_expression_list().scalar_expression())
            {
                groupByColumns.Add((SqlScalarExpression)this.Visit(scalarExpressionContext));
            }

            return(SqlGroupByClause.Create(groupByColumns.ToImmutableArray()));
        }