@kusto/language-service-next
Version:
Azure Data Explorer (a.k.a Kusto) language service for javascript
332 lines (316 loc) • 15.9 MB
JavaScript
/**
* @author Microsoft
* @copyright © Microsoft Corporation. All rights reserved.
* @compiler Bridge.NET 17.10.1
*/
Bridge.assembly("Kusto.Language.Bridge", function ($asm, globals) {
"use strict";
/** @namespace Kusto.Language */
/**
* Well known aggregates
*
* @static
* @abstract
* @public
* @class Kusto.Language.Aggregates
*/
Bridge.define("Kusto.Language.Aggregates", {
statics: {
fields: {
Sum: null,
SumIf: null,
Cnt: null,
Count: null,
CountIf: null,
DCount: null,
DCountIf: null,
TDigest: null,
TDigestMerge: null,
MergeTDigest: null,
Hll: null,
HllIf: null,
HllMerge: null,
Min: null,
MinIf: null,
Max: null,
MaxIf: null,
Avg: null,
AvgIf: null,
MakeList_Deprecated: null,
MakeList: null,
MakeListIf: null,
MakeListWithNulls: null,
MakeSet_Deprecated: null,
MakeSet: null,
MakeSetIf: null,
Passthrough: null,
MakeDictionary: null,
MakeBag: null,
MakeBagIf: null,
BuildSchema: null,
BinaryAllOr: null,
BinaryAllAnd: null,
BinaryAllXor: null,
CountDistinct: null,
CountDistinctIf: null,
PercentileReturn: null,
PercentileArrayReturn: null,
Percentile: null,
Percentiles: null,
PercentilesArray: null,
PercentileW: null,
PercentilesW: null,
PercentilesWArray: null,
Stdev: null,
StdevIf: null,
Stdevp: null,
Variance: null,
VarianceIf: null,
Variancep: null,
VariancepIf: null,
Covariance: null,
CovarianceIf: null,
Covariancep: null,
CovariancepIf: null,
Any: null,
TakeAny: null,
AnyIf: null,
TakeAnyIf: null,
ArgMin: null,
ArgMax: null,
ArgMin_Deprecated: null,
ArgMax_Deprecated: null
},
props: {
All: null
},
ctors: {
init: function () {
this.Sum = new Kusto.Language.Symbols.FunctionSymbol.$ctor2("sum", Kusto.Language.Symbols.ReturnTypeKind.Parameter0Promoted, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("sum");
this.SumIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor2("sumif", Kusto.Language.Symbols.ReturnTypeKind.Parameter0Promoted, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("sumif");
this.Cnt = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("cnt", Kusto.Language.Symbols.ScalarTypes.Long).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("cnt").Obsolete("count").Hide();
this.Count = new Kusto.Language.Symbols.FunctionSymbol.$ctor4("count", [new Kusto.Language.Symbols.Signature.$ctor5(Kusto.Language.Symbols.ScalarTypes.Long), new Kusto.Language.Symbols.Signature.$ctor5(Kusto.Language.Symbols.ScalarTypes.Long, [new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)]).Hide().Obsolete("countif")]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("count");
this.CountIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("countif", Kusto.Language.Symbols.ScalarTypes.Long, [new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("countif");
this.DCount = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("dcount", Kusto.Language.Symbols.ScalarTypes.Long, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.ctor("accuracy", Kusto.Language.Symbols.ParameterTypeKind.NotDynamic, 0, void 0, void 0, false, void 0, 0, 1, void 0, void 0)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("dcount");
this.DCountIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("dcountif", Kusto.Language.Symbols.ScalarTypes.Long, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool), new Kusto.Language.Symbols.Parameter.ctor("accuracy", Kusto.Language.Symbols.ParameterTypeKind.NotDynamic, 0, void 0, void 0, false, void 0, 0, 1, void 0, void 0)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("dcountif");
this.TDigest = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("tdigest", Kusto.Language.Symbols.ScalarTypes.DynamicArray, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable), new Kusto.Language.Symbols.Parameter.ctor("weight", Kusto.Language.Symbols.ParameterTypeKind.Integer, 0, void 0, void 0, false, void 0, 0, 1, void 0, void 0)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("tdigest");
this.TDigestMerge = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("tdigest_merge", Kusto.Language.Symbols.ScalarTypes.DynamicArray, [new Kusto.Language.Symbols.Parameter.ctor("tdigest", Kusto.Language.Symbols.ParameterTypeKind.DynamicArray)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("merge_tdigests");
this.MergeTDigest = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("merge_tdigest", Kusto.Language.Symbols.ScalarTypes.DynamicArray, [new Kusto.Language.Symbols.Parameter.ctor("tdigest", Kusto.Language.Symbols.ParameterTypeKind.DynamicArray)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("merge_tdigests");
this.Hll = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("hll", Kusto.Language.Symbols.ScalarTypes.DynamicArray, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.NotRealOrBool), new Kusto.Language.Symbols.Parameter.ctor("accuracy", Kusto.Language.Symbols.ParameterTypeKind.Integer, 0, void 0, void 0, false, void 0, 0, 1, void 0, void 0)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("hll");
this.HllIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("hll_if", Kusto.Language.Symbols.ScalarTypes.DynamicArray, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.NotRealOrBool), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool), new Kusto.Language.Symbols.Parameter.ctor("accuracy", Kusto.Language.Symbols.ParameterTypeKind.Integer, 0, void 0, void 0, false, void 0, 0, 1, void 0, void 0)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("hll_if");
this.HllMerge = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("hll_merge", Kusto.Language.Symbols.ScalarTypes.DynamicArray, [new Kusto.Language.Symbols.Parameter.ctor("hll", Kusto.Language.Symbols.ParameterTypeKind.DynamicArray)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("hll_merge");
this.Min = new Kusto.Language.Symbols.FunctionSymbol.$ctor2("min", Kusto.Language.Symbols.ReturnTypeKind.Parameter0, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Orderable)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("min");
this.MinIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor2("minif", Kusto.Language.Symbols.ReturnTypeKind.Parameter0, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Orderable), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("minif");
this.Max = new Kusto.Language.Symbols.FunctionSymbol.$ctor2("max", Kusto.Language.Symbols.ReturnTypeKind.Parameter0, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Orderable)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("max");
this.MaxIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor2("maxif", Kusto.Language.Symbols.ReturnTypeKind.Parameter0, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Orderable), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("maxif");
this.Avg = new Kusto.Language.Symbols.FunctionSymbol.$ctor4("avg", [new Kusto.Language.Symbols.Signature.$ctor5(Kusto.Language.Symbols.ScalarTypes.Real, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Integer)]), new Kusto.Language.Symbols.Signature.$ctor5(Kusto.Language.Symbols.ScalarTypes.Real, [new Kusto.Language.Symbols.Parameter.$ctor2("expr", Kusto.Language.Symbols.ScalarTypes.Real)]), new Kusto.Language.Symbols.Signature.$ctor5(Kusto.Language.Symbols.ScalarTypes.Decimal, [new Kusto.Language.Symbols.Parameter.$ctor2("expr", Kusto.Language.Symbols.ScalarTypes.Decimal)]), new Kusto.Language.Symbols.Signature.$ctor5(Kusto.Language.Symbols.ScalarTypes.TimeSpan, [new Kusto.Language.Symbols.Parameter.$ctor2("expr", Kusto.Language.Symbols.ScalarTypes.TimeSpan)]), new Kusto.Language.Symbols.Signature.$ctor5(Kusto.Language.Symbols.ScalarTypes.DateTime, [new Kusto.Language.Symbols.Parameter.$ctor2("expr", Kusto.Language.Symbols.ScalarTypes.DateTime)])]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("avg");
this.AvgIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor4("avgif", [new Kusto.Language.Symbols.Signature.$ctor5(Kusto.Language.Symbols.ScalarTypes.Real, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Integer), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)]), new Kusto.Language.Symbols.Signature.$ctor5(Kusto.Language.Symbols.ScalarTypes.Real, [new Kusto.Language.Symbols.Parameter.$ctor2("expr", Kusto.Language.Symbols.ScalarTypes.Real), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)]), new Kusto.Language.Symbols.Signature.$ctor5(Kusto.Language.Symbols.ScalarTypes.Decimal, [new Kusto.Language.Symbols.Parameter.$ctor2("expr", Kusto.Language.Symbols.ScalarTypes.Decimal), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)]), new Kusto.Language.Symbols.Signature.$ctor5(Kusto.Language.Symbols.ScalarTypes.TimeSpan, [new Kusto.Language.Symbols.Parameter.$ctor2("expr", Kusto.Language.Symbols.ScalarTypes.TimeSpan), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)]), new Kusto.Language.Symbols.Signature.$ctor5(Kusto.Language.Symbols.ScalarTypes.DateTime, [new Kusto.Language.Symbols.Parameter.$ctor2("expr", Kusto.Language.Symbols.ScalarTypes.DateTime), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)])]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("avgif");
this.MakeList_Deprecated = new Kusto.Language.Symbols.FunctionSymbol.$ctor2("makelist", Kusto.Language.Symbols.ReturnTypeKind.Parameter0Array, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.ctor("maxSize", Kusto.Language.Symbols.ParameterTypeKind.Integer, 0, void 0, void 0, false, void 0, 0, 1, void 0, void 0)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("list").Obsolete("make_list").Hide();
this.MakeList = new Kusto.Language.Symbols.FunctionSymbol.$ctor2("make_list", Kusto.Language.Symbols.ReturnTypeKind.Parameter0Array, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.ctor("maxSize", Kusto.Language.Symbols.ParameterTypeKind.Integer, 0, void 0, void 0, false, void 0, 0, 1, void 0, void 0)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("list");
this.MakeListIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor2("make_list_if", Kusto.Language.Symbols.ReturnTypeKind.Parameter0Array, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool), new Kusto.Language.Symbols.Parameter.ctor("maxSize", Kusto.Language.Symbols.ParameterTypeKind.Integer, 0, void 0, void 0, false, void 0, 0, 1, void 0, void 0)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("list");
this.MakeListWithNulls = new Kusto.Language.Symbols.FunctionSymbol.$ctor2("make_list_with_nulls", Kusto.Language.Symbols.ReturnTypeKind.Parameter0Array, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("list");
this.MakeSet_Deprecated = new Kusto.Language.Symbols.FunctionSymbol.$ctor2("makeset", Kusto.Language.Symbols.ReturnTypeKind.Parameter0Array, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.ctor("maxSize", Kusto.Language.Symbols.ParameterTypeKind.Integer, 0, void 0, void 0, false, void 0, 0, 1, void 0, void 0)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("set").Obsolete("make_set").Hide();
this.MakeSet = new Kusto.Language.Symbols.FunctionSymbol.$ctor2("make_set", Kusto.Language.Symbols.ReturnTypeKind.Parameter0Array, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.ctor("maxSize", Kusto.Language.Symbols.ParameterTypeKind.Integer, 0, void 0, void 0, false, void 0, 0, 1, void 0, void 0)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("set");
this.MakeSetIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor2("make_set_if", Kusto.Language.Symbols.ReturnTypeKind.Parameter0Array, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool), new Kusto.Language.Symbols.Parameter.ctor("maxSize", Kusto.Language.Symbols.ParameterTypeKind.Integer, 0, void 0, void 0, false, void 0, 0, 1, void 0, void 0)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("set");
this.Passthrough = new Kusto.Language.Symbols.FunctionSymbol.$ctor2("passthrough", Kusto.Language.Symbols.ReturnTypeKind.Parameter0, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.FirstArgument).Hide();
this.MakeDictionary = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("make_dictionary", Kusto.Language.Symbols.ScalarTypes.DynamicBag, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.DynamicBag), new Kusto.Language.Symbols.Parameter.ctor("maxSize", Kusto.Language.Symbols.ParameterTypeKind.Integer, 0, void 0, void 0, false, void 0, 0, 1, void 0, void 0)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("dictionary").Hide();
this.MakeBag = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("make_bag", Kusto.Language.Symbols.ScalarTypes.DynamicBag, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.DynamicBag), new Kusto.Language.Symbols.Parameter.ctor("maxSize", Kusto.Language.Symbols.ParameterTypeKind.Integer, 0, void 0, void 0, false, void 0, 0, 1, void 0, void 0)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("bag");
this.MakeBagIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("make_bag_if", Kusto.Language.Symbols.ScalarTypes.DynamicBag, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.DynamicBag), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool), new Kusto.Language.Symbols.Parameter.ctor("maxSize", Kusto.Language.Symbols.ParameterTypeKind.Integer, 0, void 0, void 0, false, void 0, 0, 1, void 0, void 0)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("bag");
this.BuildSchema = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("buildschema", Kusto.Language.Symbols.ScalarTypes.DynamicBag, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.DynamicBag)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("schema");
this.BinaryAllOr = new Kusto.Language.Symbols.FunctionSymbol.$ctor4("binary_all_or", [new Kusto.Language.Symbols.Signature.$ctor2(Kusto.Language.Symbols.ReturnTypeKind.Parameter0, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable)])]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.FirstArgument);
this.BinaryAllAnd = new Kusto.Language.Symbols.FunctionSymbol.$ctor4("binary_all_and", [new Kusto.Language.Symbols.Signature.$ctor2(Kusto.Language.Symbols.ReturnTypeKind.Parameter0, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable)])]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.FirstArgument);
this.BinaryAllXor = new Kusto.Language.Symbols.FunctionSymbol.$ctor4("binary_all_xor", [new Kusto.Language.Symbols.Signature.$ctor2(Kusto.Language.Symbols.ReturnTypeKind.Parameter0, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable)])]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.FirstArgument);
this.CountDistinct = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("count_distinct", Kusto.Language.Symbols.ScalarTypes.Long, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.NotDynamic)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("count_distinct").WithOptimizedAlternative("dcount");
this.CountDistinctIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("count_distinctif", Kusto.Language.Symbols.ScalarTypes.Long, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.NotDynamic), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("count_distinctif").WithOptimizedAlternative("dcountif");
this.PercentileReturn = function (context) {
var cols = new (System.Collections.Generic.List$1(Kusto.Language.Symbols.ColumnSymbol)).ctor();
Kusto.Language.Aggregates.AddPercentileColumns(cols, context, "expr", "percentile");
return new Kusto.Language.Symbols.TupleSymbol.$ctor1(cols);
};
this.PercentileArrayReturn = function (context) {
var cols = new (System.Collections.Generic.List$1(Kusto.Language.Symbols.ColumnSymbol)).ctor();
var valueArg;
var valueArgName;
if (((valueArg = context.GetArgument$1("expr"))) != null && ((valueArgName = context.GetResultName(valueArg))) != null) {
cols.add(new Kusto.Language.Symbols.ColumnSymbol("percentiles_" + (valueArgName || ""), Kusto.Language.Symbols.ScalarTypes.DynamicArray, void 0, void 0, valueArg, void 0));
}
return new Kusto.Language.Symbols.TupleSymbol.$ctor1(cols);
};
this.Percentile = new Kusto.Language.Symbols.FunctionSymbol.ctor("percentile", Kusto.Language.Aggregates.PercentileReturn, Kusto.Language.Symbols.Tabularity.Scalar, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.ctor("percentile", Kusto.Language.Symbols.ParameterTypeKind.Number)]);
this.Percentiles = new Kusto.Language.Symbols.FunctionSymbol.ctor("percentiles", Kusto.Language.Aggregates.PercentileReturn, Kusto.Language.Symbols.Tabularity.Scalar, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.ctor("percentile", Kusto.Language.Symbols.ParameterTypeKind.Number, 0, void 0, void 0, false, void 0, 1, Kusto.Language.FunctionHelpers.MaxRepeat, void 0, void 0)]);
this.PercentilesArray = new Kusto.Language.Symbols.FunctionSymbol.$ctor4("percentiles_array", [new Kusto.Language.Symbols.Signature.ctor(Kusto.Language.Aggregates.PercentileArrayReturn, Kusto.Language.Symbols.Tabularity.Scalar, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.ctor("percentile", Kusto.Language.Symbols.ParameterTypeKind.Number, 0, void 0, void 0, false, void 0, 1, Kusto.Language.FunctionHelpers.MaxRepeat, void 0, void 0)]), new Kusto.Language.Symbols.Signature.ctor(Kusto.Language.Aggregates.PercentileArrayReturn, Kusto.Language.Symbols.Tabularity.Scalar, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.ctor("percentiles", Kusto.Language.Symbols.ParameterTypeKind.DynamicArray)])]);
this.PercentileW = new Kusto.Language.Symbols.FunctionSymbol.ctor("percentilew", Kusto.Language.Aggregates.PercentileReturn, Kusto.Language.Symbols.Tabularity.Scalar, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.ctor("weight", Kusto.Language.Symbols.ParameterTypeKind.Integer), new Kusto.Language.Symbols.Parameter.ctor("percentile", Kusto.Language.Symbols.ParameterTypeKind.Number)]);
this.PercentilesW = new Kusto.Language.Symbols.FunctionSymbol.ctor("percentilesw", Kusto.Language.Aggregates.PercentileReturn, Kusto.Language.Symbols.Tabularity.Scalar, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.ctor("weight", Kusto.Language.Symbols.ParameterTypeKind.Integer), new Kusto.Language.Symbols.Parameter.ctor("percentile", Kusto.Language.Symbols.ParameterTypeKind.Number, 0, void 0, void 0, false, void 0, 1, Kusto.Language.FunctionHelpers.MaxRepeat, void 0, void 0)]);
this.PercentilesWArray = new Kusto.Language.Symbols.FunctionSymbol.$ctor4("percentilesw_array", [new Kusto.Language.Symbols.Signature.ctor(Kusto.Language.Aggregates.PercentileArrayReturn, Kusto.Language.Symbols.Tabularity.Scalar, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.ctor("weight", Kusto.Language.Symbols.ParameterTypeKind.Integer), new Kusto.Language.Symbols.Parameter.ctor("percentile", Kusto.Language.Symbols.ParameterTypeKind.Number, 0, void 0, void 0, false, void 0, 1, Kusto.Language.FunctionHelpers.MaxRepeat, void 0, void 0)]), new Kusto.Language.Symbols.Signature.ctor(Kusto.Language.Aggregates.PercentileArrayReturn, Kusto.Language.Symbols.Tabularity.Scalar, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.ctor("weight", Kusto.Language.Symbols.ParameterTypeKind.Integer), new Kusto.Language.Symbols.Parameter.ctor("percentiles", Kusto.Language.Symbols.ParameterTypeKind.DynamicArray)])]);
this.Stdev = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("stdev", Kusto.Language.Symbols.ScalarTypes.Real, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("stdev");
this.StdevIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("stdevif", Kusto.Language.Symbols.ScalarTypes.Real, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("stdevif");
this.Stdevp = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("stdevp", Kusto.Language.Symbols.ScalarTypes.Real, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("stdevp");
this.Variance = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("variance", Kusto.Language.Symbols.ScalarTypes.Real, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("variance");
this.VarianceIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("varianceif", Kusto.Language.Symbols.ScalarTypes.Real, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("varianceif");
this.Variancep = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("variancep", Kusto.Language.Symbols.ScalarTypes.Real, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("variancep");
this.VariancepIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("variancepif", Kusto.Language.Symbols.ScalarTypes.Real, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("variancepif");
this.Covariance = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("covariance", Kusto.Language.Symbols.ScalarTypes.Real, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable), new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("covariance");
this.CovarianceIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("covarianceif", Kusto.Language.Symbols.ScalarTypes.Real, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable), new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("covarianceif");
this.Covariancep = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("covariancep", Kusto.Language.Symbols.ScalarTypes.Real, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable), new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("covariancep");
this.CovariancepIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor5("covariancepif", Kusto.Language.Symbols.ScalarTypes.Real, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable), new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Summable), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("covariancepif");
this.Any = new Kusto.Language.Symbols.FunctionSymbol.$ctor4("any", [new Kusto.Language.Symbols.Signature.$ctor2(Kusto.Language.Symbols.ReturnTypeKind.Parameter0, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar)]), new Kusto.Language.Symbols.Signature.ctor(function (context) {
return Kusto.Language.Aggregates.GetAnyResult(context, null);
}, Kusto.Language.Symbols.Tabularity.Scalar, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar, 0, void 0, void 0, false, void 0, 2, Kusto.Language.FunctionHelpers.MaxRepeat, void 0, void 0)]), new Kusto.Language.Symbols.Signature.ctor(function (context) {
return Kusto.Language.Aggregates.GetAnyResult(context, null);
}, Kusto.Language.Symbols.Tabularity.Scalar, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar, Kusto.Language.Symbols.ArgumentKind.StarOnly)])]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("any").Obsolete("take_any");
this.TakeAny = new Kusto.Language.Symbols.FunctionSymbol.$ctor4("take_any", [new Kusto.Language.Symbols.Signature.ctor(function (context) {
return Kusto.Language.Aggregates.GetAnyResult(context, "any_");
}, Kusto.Language.Symbols.Tabularity.Scalar, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar, Kusto.Language.Symbols.ArgumentKind.StarAllowed, void 0, void 0, false, void 0, 1, Kusto.Language.FunctionHelpers.MaxRepeat, void 0, void 0)])]);
this.AnyIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor4("anyif", [new Kusto.Language.Symbols.Signature.$ctor2(Kusto.Language.Symbols.ReturnTypeKind.Parameter0, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)])]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.PrefixAndFirstArgument).WithResultNamePrefix("anyif").Obsolete("take_anyif");
this.TakeAnyIf = new Kusto.Language.Symbols.FunctionSymbol.$ctor4("take_anyif", [new Kusto.Language.Symbols.Signature.$ctor2(Kusto.Language.Symbols.ReturnTypeKind.Parameter0, [new Kusto.Language.Symbols.Parameter.ctor("expr", Kusto.Language.Symbols.ParameterTypeKind.Scalar), new Kusto.Language.Symbols.Parameter.$ctor2("predicate", Kusto.Language.Symbols.ScalarTypes.Bool)])]).WithResultNameKind(Kusto.Language.Symbols.ResultNameKind.FirstArgument);
this.ArgMin = new Kusto.Language.Symbols.FunctionSymbol.$ctor4("arg_min", [new Kusto.Language.Symbols.Signature.ctor(function (context) {
return Kusto.Language.Aggregates.GetArgMinMaxResult(context, "min");
}, Kusto.Language.Symbols.Tabularity.Scalar, [new Kusto.Language.Symbols.Parameter.ctor("minimized", Kusto.Language.Symbols.ParameterTypeKind.Orderable), new Kusto.Language.Symbols.Parameter.ctor("returned", Kusto.Language.Symbols.ParameterTypeKind.Scalar, Kusto.Language.Symbols.ArgumentKind.StarAllowed, void 0, void 0, false, void 0, 0, Kusto.Language.FunctionHelpers.MaxRepeat, void 0, void 0)])]);
this.ArgMax = new Kusto.Language.Symbols.FunctionSymbol.$ctor4("arg_max", [new Kusto.Language.Symbols.Signature.ctor(function (context) {
return Kusto.Language.Aggregates.GetArgMinMaxResult(context, "max");
}, Kusto.Language.Symbols.Tabularity.Scalar, [new Kusto.Language.Symbols.Parameter.ctor("maximized", Kusto.Language.Symbols.ParameterTypeKind.Orderable), new Kusto.Language.Symbols.Parameter.ctor("returned", Kusto.Language.Symbols.ParameterTypeKind.Scalar, Kusto.Language.Symbols.ArgumentKind.StarAllowed, void 0, void 0, false, void 0, 0, Kusto.Language.FunctionHelpers.MaxRepeat, void 0, void 0)])]);
this.ArgMin_Deprecated = new Kusto.Language.Symbols.FunctionSymbol.$ctor4("argmin", [new Kusto.Language.Symbols.Signature.ctor(Kusto.Language.Aggregates.GetArgMinMaxDepResult, Kusto.Language.Symbols.Tabularity.Scalar, [new Kusto.Language.Symbols.Parameter.ctor("minimized", Kusto.Language.Symbols.ParameterTypeKind.Orderable), new Kusto.Language.Symbols.Parameter.ctor("returned", Kusto.Language.Symbols.ParameterTypeKind.Scalar, Kusto.Language.Symbols.ArgumentKind.StarAllowed, void 0, void 0, false, void 0, 0, Kusto.Language.FunctionHelpers.MaxRepeat, void 0, void 0)])]).WithResultNamePrefix("min").Obsolete("arg_min").Hide();
this.ArgMax_Deprecated = new Kusto.Language.Symbols.FunctionSymbol.$ctor4("argmax", [new Kusto.Language.Symbols.Signature.ctor(Kusto.Language.Aggregates.GetArgMinMaxDepResult, Kusto.Language.Symbols.Tabularity.Scalar, [new Kusto.Language.Symbols.Parameter.ctor("maximized", Kusto.Language.Symbols.ParameterTypeKind.Orderable), new Kusto.Language.Symbols.Parameter.ctor("returned", Kusto.Language.Symbols.ParameterTypeKind.Scalar, Kusto.Language.Symbols.ArgumentKind.StarAllowed, void 0, void 0, false, void 0, 0, Kusto.Language.FunctionHelpers.MaxRepeat, void 0, void 0)])]).WithResultNamePrefix("max").Obsolete("arg_max").Hide();
this.All = System.Array.init([Kusto.Language.Aggregates.Sum, Kusto.Language.Aggregates.SumIf, Kusto.Language.Aggregates.Cnt, Kusto.Language.Aggregates.Count, Kusto.Language.Aggregates.CountIf, Kusto.Language.Aggregates.DCount, Kusto.Language.Aggregates.DCountIf, Kusto.Language.Aggregates.TDigest, Kusto.Language.Aggregates.TDigestMerge, Kusto.Language.Aggregates.MergeTDigest, Kusto.Language.Aggregates.Hll, Kusto.Language.Aggregates.HllIf, Kusto.Language.Aggregates.HllMerge, Kusto.Language.Aggregates.Min, Kusto.Language.Aggregates.MinIf, Kusto.Language.Aggregates.Max, Kusto.Language.Aggregates.MaxIf, Kusto.Language.Aggregates.Avg, Kusto.Language.Aggregates.AvgIf, Kusto.Language.Aggregates.MakeList_Deprecated, Kusto.Language.Aggregates.MakeList, Kusto.Language.Aggregates.MakeListIf, Kusto.Language.Aggregates.MakeListWithNulls, Kusto.Language.Aggregates.MakeSet_Deprecated, Kusto.Language.Aggregates.MakeSet, Kusto.Language.Aggregates.MakeSetIf, Kusto.Language.Aggregates.MakeDictionary, Kusto.Language.Aggregates.MakeBag, Kusto.Language.Aggregates.MakeBagIf, Kusto.Language.Aggregates.BuildSchema, Kusto.Language.Aggregates.Passthrough, Kusto.Language.Aggregates.Percentile, Kusto.Language.Aggregates.Percentiles, Kusto.Language.Aggregates.PercentilesArray, Kusto.Language.Aggregates.PercentileW, Kusto.Language.Aggregates.PercentilesW, Kusto.Language.Aggregates.PercentilesWArray, Kusto.Language.Aggregates.Stdev, Kusto.Language.Aggregates.StdevIf, Kusto.Language.Aggregates.Stdevp, Kusto.Language.Aggregates.Variance, Kusto.Language.Aggregates.VarianceIf, Kusto.Language.Aggregates.Variancep, Kusto.Language.Aggregates.VariancepIf, Kusto.Language.Aggregates.Covariance, Kusto.Language.Aggregates.CovarianceIf, Kusto.Language.Aggregates.Covariancep, Kusto.Language.Aggregates.CovariancepIf, Kusto.Language.Aggregates.Any, Kusto.Language.Aggregates.TakeAny, Kusto.Language.Aggregates.AnyIf, Kusto.Language.Aggregates.TakeAnyIf, Kusto.Language.Aggregates.ArgMin, Kusto.Language.Aggregates.ArgMax, Kusto.Language.Aggregates.ArgMin_Deprecated, Kusto.Language.Aggregates.ArgMax_Deprecated, Kusto.Language.Aggregates.BinaryAllOr, Kusto.Language.Aggregates.BinaryAllAnd, Kusto.Language.Aggregates.BinaryAllXor, Kusto.Language.Aggregates.CountDistinct, Kusto.Language.Aggregates.CountDistinctIf], Kusto.Language.Symbols.FunctionSymbol);
}
},
methods: {
AddPercentileColumns: function (columns, context, valueParameterName, percentileParameterName) {
var $t;
var valueArg;
var valueArgName;
if (((valueArg = context.GetArgument$1(valueParameterName))) != null && ((valueArgName = context.GetResultName(valueArg))) != null) {
var resultType = valueArg.ResultType;
if (Bridge.referenceEquals(resultType, Kusto.Language.Symbols.ScalarTypes.Int)) {
resultType = Kusto.Language.Symbols.ScalarTypes.Long;
} else {
if (Bridge.referenceEquals(resultType, Kusto.Language.Symbols.ScalarTypes.Decimal)) {
resultType = Kusto.Language.Symbols.ScalarTypes.Real;
}
}
$t = Bridge.getEnumerator(context.GetArguments$1(percentileParameterName), Kusto.Language.Syntax.Expression);
try {
while ($t.moveNext()) {
var percentileArg = $t.Current;
var percentileFragment = Kusto.Language.FunctionHelpers.MakeValidNameFragment(Kusto.Language.FunctionHelpers.GetConstantValue(percentileArg));
var name = (percentileParameterName || "") + "_" + (valueArgName || "") + "_" + (percentileFragment || "");
columns.add(new Kusto.Language.Symbols.ColumnSymbol(name, resultType, void 0, void 0, valueArg, void 0));
}
} finally {
if (Bridge.is($t, System.IDisposable)) {
$t.System$IDisposable$Dispose();
}
}
}
},
GetAnyResult: function (context, unnamedExpressionPrefix) {
var $t, $t1;
var columns = new (System.Collections.Generic.List$1(Kusto.Language.Symbols.ColumnSymbol)).ctor();
var prefix = ($t = unnamedExpressionPrefix, $t != null ? $t : "");
var doNotRepeat = new (System.Collections.Generic.HashSet$1(Kusto.Language.Symbols.ColumnSymbol)).$ctor1(Kusto.Language.FunctionHelpers.GetSummarizeByColumns(context.Arguments));
var anyStar = System.Linq.Enumerable.from(context.Arguments, Kusto.Language.Syntax.Expression).any(function (a) {
return Bridge.is(a, Kusto.Language.Syntax.StarExpression);
});
for (var i = 0; i < System.Array.getCount(context.Arguments, Kusto.Language.Syntax.Expression); i = (i + 1) | 0) {
var arg = System.Array.getItem(context.Arguments, i, Kusto.Language.Syntax.Expression);
if (Bridge.is(arg, Kusto.Language.Syntax.StarExpression)) {
$t1 = Bridge.getEnumerator(context.RowScope.Columns, Kusto.Language.Symbols.ColumnSymbol);
try {
while ($t1.moveNext()) {
var c = $t1.Current;
if (Kusto.Language.Aggregates.CanAddAnyResultColumn(c, doNotRepeat, anyStar)) {
doNotRepeat.add(c);
columns.add(c);
}
}
} finally {
if (Bridge.is($t1, System.IDisposable)) {
$t1.System$IDisposable$Dispose();
}
}
} else {
var snx;
var vc;
if (((snx = Bridge.as(arg, Kusto.Language.Syntax.SimpleNamedExpression))) != null && ((vc = Kusto.Language.Aggregates.GetResultColumn(snx.Expression))) != null) {
if (Kusto.Language.Aggregates.CanAddAnyResultColumn(vc, doNotRepeat, anyStar)) {
doNotRepeat.add(vc);
columns.add(new Kusto.Language.Symbols.ColumnSymbol(snx.Name.SimpleName, vc.Type, void 0, System.Array.init([vc], Kusto.Language.Symbols.ColumnSymbol), void 0, void 0));
}
} else {
var c1;
if (((c1 = Kusto.Language.Aggregates.GetResultColumn(arg))) != null) {
// this is explicitly referenced column (not assigned)
if (Kusto.Language.Aggregates.CanAddAnyResultColumn(c1, doNotRepeat, anyStar)) {
if (doNotRepeat.contains(c1)) {
// change identity of explicitly referenced columns so won't match same columns already in projection list
// this will get renamed by project builder
columns.add(new Kusto.Language.Symbols.ColumnSymbol(c1.Name, c1.Type, void 0, System.Array.init([c1], Kusto.Language.Symbols.ColumnSymbol), void 0, void 0));
} else {
doNotRepeat.add(c1);
columns.add(c1);
}
}
} else {
var expName = Kusto.Language.Binding.Binder.GetExpressionResultName(arg, "");
if (System.String.isNullOrEmpty(expName)) {
expName = (prefix || "") + "arg" + i;
}
var col = new Kusto.Language.Symbols.ColumnSymbol(expName, arg.ResultType, void 0, void 0, arg, void 0);
columns.add(col);
}
}
}
}
return new Kusto.Language.Symbols.TupleSymbol.$ctor1(columns);
},
CanAddAnyResultColumn: function (column, doNotRepeat, anyStar) {
if (!anyStar) {
return true;
}
return !doNotRepeat.contains(column);
},
GetArgMinMaxResult: function (context, prefix) {
var $t;
var columns = new (System.Collections.Generic.List$1(Kusto.Language.Symbols.ColumnSymbol)).ctor();
if (System.Array.getCount(context.Arguments, Kusto.Language.Syntax.Expression) > 0) {
var byClauseColumns = new (System.Collections.Generic.HashSet$1(Kusto.Language.Symbols.ColumnSymbol)).$ctor1(Kusto.Language.FunctionHelpers.GetSummarizeByColumns(context.Arguments));
var doNotRepeat = new (System.Collections.Generic.HashSet$1(Kusto.Language.Symbols.ColumnSymbol)).ctor();
var primaryArg = System.Array.getItem(context.Arguments, 0, Kusto.Language.Syntax.Expression);
var primaryColName = Kusto.Language.Binding.Binder.GetExpressionResultName(primaryArg);
var anyStar = System.Linq.Enumerable.from(context.Arguments, Kusto.Language.Syntax.Expression).any(function (a) {
return Bridge.is(a, Kusto.Language.Syntax.StarExpression);
});
for (var i = 0; i < System.Array.getCount(context.Arguments, Kusto.Language.Syntax.Expression); i = (i + 1) | 0) {
var arg = System.Array.getItem(context.Arguments, i, Kusto.Language.Syntax.Expression);
if (Bridge.is(arg, Kusto.Language.Syntax.StarExpression)) {
$t = Bridge.getEnumerator(context.RowScope.Columns, Kusto.Language.Symbols.ColumnSymbol);
try {
while ($t.moveNext()) {
var c = $t.Current;
if (Kusto.Language.Aggregates.CanAddArgMinMaxResultColumn(i, c, byClauseColumns, doNotRepeat, anyStar)) {
doNotRepeat.add(c);
columns.add(c);
}
}
} finally {
if (Bridge.is($t, System.IDisposable)) {
$t.System$IDisposable$Dispose();
}
}
} else {
var snx;
var vc;
if (((snx = Bridge.as(arg, Kusto.Language.Syntax.SimpleNamedExpression))) != null && ((vc = Kusto.Language.Aggregates.GetResultColumn(snx.Expression))) != null) {
if (Kusto.Language.Aggregates.CanAddArgMinMaxResultColumn(i, vc, byClauseColumns, doNotRepeat, anyStar)) {
doNotRepeat.add(vc);
columns.add(new Kusto.Language.Symbols.ColumnSymbol(snx.Name.SimpleName, vc.Type, void 0, System.Array.init([vc], Kusto.Language.Symbols.ColumnSymbol), void 0, void 0));
}
} else {
var c1;
if (((c1 = Kusto.Language.Aggregates.GetResultColumn(arg))) != null) {
// this is explicitly referenced column (not assigned)
if (Kusto.Language.Aggregates.CanAddArgMinMaxResultColumn(i, c1, byClauseColumns, doNotRepeat, anyStar)) {
if (doNotRepeat.contains(c1) || byClauseColumns.contains(c1)) {
// change identity of explicitly referenced columns so won't match same columns already in projection list
// this will get renamed by project builder
columns.add(new Kusto.Language.Symbols.ColumnSymbol(c1.Name, c1.Type, void 0, System.Array.init([c1], Kusto.Language.Symbols.ColumnSymbol), void 0, void 0));