Пример #1
0
        public SummarizeOperator(string summarize)
        {
            scalarSummarizer = ParseExpressionKusto(summarize) as ScalarSummarizer;
            ParseGroupings();

            _aggregations = new DimensionIndex <IDictionary <string, object> >();
        }
Пример #2
0
        public override ScalarValue VisitSummarizeOperator(Kusto.Language.Syntax.SummarizeOperator node)
        {
            ScalarSummarizer scalarSummarizer = new ScalarSummarizer();

            var aggregates = node.Aggregates;

            foreach (var aggregate in aggregates)
            {
                RxKqlScalarValue scalarValue = aggregate.Accept(this) as RxKqlScalarValue;
                scalarSummarizer.Aggregations.Add(scalarValue.Left, scalarValue.Right as AggregationFunction);
            }

            scalarSummarizer.GroupingElements = node.ByClause.Expressions.Accept(this) as ScalarValueList;

            return(scalarSummarizer);
        }