@@ -15,6 +15,7 @@ def test_aggregators(self):
15
15
("doublesum" , "doubleSum" ),
16
16
("doublemin" , "doubleMin" ),
17
17
("doublemax" , "doubleMax" ),
18
+ ("doublemean" , "doubleMean" ),
18
19
("count" , "count" ),
19
20
("hyperunique" , "hyperUnique" ),
20
21
("stringfirst" , "stringFirst" ),
@@ -34,12 +35,13 @@ def test_filtered_aggregator(self):
34
35
aggregators .doublesum ("metric3" ),
35
36
aggregators .doublemin ("metric4" ),
36
37
aggregators .doublemax ("metric5" ),
37
- aggregators .hyperunique ("metric6" ),
38
+ aggregators .doublemean ("metric6" ),
39
+ aggregators .hyperunique ("metric7" ),
38
40
aggregators .cardinality ("dim1" ),
39
41
aggregators .cardinality (["dim1" , "dim2" ], by_row = True ),
40
42
aggregators .thetasketch ("dim1" ),
41
- aggregators .thetasketch ("metric7 " ),
42
- aggregators .thetasketch ("metric8 " , isinputthetasketch = True , size = 8192 ),
43
+ aggregators .thetasketch ("metric8 " ),
44
+ aggregators .thetasketch ("metric9 " , isinputthetasketch = True , size = 8192 ),
43
45
]
44
46
for agg in aggs :
45
47
expected = {
@@ -82,13 +84,14 @@ def test_build_aggregators(self):
82
84
"agg3" : aggregators .doublesum ("metric3" ),
83
85
"agg4" : aggregators .doublemin ("metric4" ),
84
86
"agg5" : aggregators .doublemax ("metric5" ),
85
- "agg6" : aggregators .hyperunique ("metric6" ),
86
- "agg7" : aggregators .cardinality ("dim1" ),
87
- "agg8" : aggregators .cardinality (["dim1" , "dim2" ], by_row = True ),
88
- "agg9" : aggregators .thetasketch ("dim1" ),
89
- "agg10" : aggregators .thetasketch ("metric7" ),
90
- "agg11" : aggregators .thetasketch (
91
- "metric8" , isinputthetasketch = True , size = 8192
87
+ "agg6" : aggregators .doublemean ("metric6" ),
88
+ "agg7" : aggregators .hyperunique ("metric7" ),
89
+ "agg8" : aggregators .cardinality ("dim1" ),
90
+ "agg9" : aggregators .cardinality (["dim1" , "dim2" ], by_row = True ),
91
+ "agg10" : aggregators .thetasketch ("dim1" ),
92
+ "agg11" : aggregators .thetasketch ("metric8" ),
93
+ "agg12" : aggregators .thetasketch (
94
+ "metric9" , isinputthetasketch = True , size = 8192
92
95
),
93
96
}
94
97
built_agg = aggregators .build_aggregators (agg_input )
@@ -98,37 +101,38 @@ def test_build_aggregators(self):
98
101
{"name" : "agg3" , "type" : "doubleSum" , "fieldName" : "metric3" },
99
102
{"name" : "agg4" , "type" : "doubleMin" , "fieldName" : "metric4" },
100
103
{"name" : "agg5" , "type" : "doubleMax" , "fieldName" : "metric5" },
101
- {"name" : "agg6" , "type" : "hyperUnique" , "fieldName" : "metric6" },
104
+ {"name" : "agg6" , "type" : "doubleMean" , "fieldName" : "metric6" },
105
+ {"name" : "agg7" , "type" : "hyperUnique" , "fieldName" : "metric7" },
102
106
{
103
- "name" : "agg7 " ,
107
+ "name" : "agg8 " ,
104
108
"type" : "cardinality" ,
105
109
"fieldNames" : ["dim1" ],
106
110
"byRow" : False ,
107
111
},
108
112
{
109
- "name" : "agg8 " ,
113
+ "name" : "agg9 " ,
110
114
"type" : "cardinality" ,
111
115
"fieldNames" : ["dim1" , "dim2" ],
112
116
"byRow" : True ,
113
117
},
114
118
{
115
- "name" : "agg9 " ,
119
+ "name" : "agg10 " ,
116
120
"type" : "thetaSketch" ,
117
121
"fieldName" : "dim1" ,
118
122
"isInputThetaSketch" : False ,
119
123
"size" : 16384 ,
120
124
},
121
125
{
122
- "name" : "agg10 " ,
126
+ "name" : "agg11 " ,
123
127
"type" : "thetaSketch" ,
124
- "fieldName" : "metric7 " ,
128
+ "fieldName" : "metric8 " ,
125
129
"isInputThetaSketch" : False ,
126
130
"size" : 16384 ,
127
131
},
128
132
{
129
- "name" : "agg11 " ,
133
+ "name" : "agg12 " ,
130
134
"type" : "thetaSketch" ,
131
- "fieldName" : "metric8 " ,
135
+ "fieldName" : "metric9 " ,
132
136
"isInputThetaSketch" : True ,
133
137
"size" : 8192 ,
134
138
},
@@ -145,14 +149,15 @@ def test_build_filtered_aggregator(self):
145
149
"agg3" : aggregators .filtered (filter_ , aggregators .doublesum ("metric3" )),
146
150
"agg4" : aggregators .filtered (filter_ , aggregators .doublemin ("metric4" )),
147
151
"agg5" : aggregators .filtered (filter_ , aggregators .doublemax ("metric5" )),
148
- "agg6" : aggregators .filtered (filter_ , aggregators .hyperunique ("metric6" )),
149
- "agg7" : aggregators .filtered (filter_ , aggregators .cardinality ("dim1" )),
150
- "agg8" : aggregators .filtered (
152
+ "agg5" : aggregators .filtered (filter_ , aggregators .doublemean ("metric6" )),
153
+ "agg7" : aggregators .filtered (filter_ , aggregators .hyperunique ("metric7" )),
154
+ "agg8" : aggregators .filtered (filter_ , aggregators .cardinality ("dim1" )),
155
+ "agg9" : aggregators .filtered (
151
156
filter_ , aggregators .cardinality (["dim1" , "dim2" ], by_row = True )
152
157
),
153
- "agg9 " : aggregators .filtered (filter_ , aggregators .thetasketch ("dim1" )),
154
- "agg10 " : aggregators .filtered (filter_ , aggregators .thetasketch ("metric7" )),
155
- "agg11 " : aggregators .filtered (
158
+ "agg10 " : aggregators .filtered (filter_ , aggregators .thetasketch ("dim1" )),
159
+ "agg11 " : aggregators .filtered (filter_ , aggregators .thetasketch ("metric7" )),
160
+ "agg12 " : aggregators .filtered (
156
161
filter_ ,
157
162
aggregators .thetasketch ("metric8" , isinputthetasketch = True , size = 8192 ),
158
163
),
@@ -168,35 +173,36 @@ def test_build_filtered_aggregator(self):
168
173
{"name" : "agg3" , "type" : "doubleSum" , "fieldName" : "metric3" },
169
174
{"name" : "agg4" , "type" : "doubleMin" , "fieldName" : "metric4" },
170
175
{"name" : "agg5" , "type" : "doubleMax" , "fieldName" : "metric5" },
171
- {"name" : "agg6" , "type" : "hyperUnique" , "fieldName" : "metric6" },
176
+ {"name" : "agg6" , "type" : "doubleMean" , "fieldName" : "metric6" },
177
+ {"name" : "agg7" , "type" : "hyperUnique" , "fieldName" : "metric7" },
172
178
{
173
- "name" : "agg7 " ,
179
+ "name" : "agg8 " ,
174
180
"type" : "cardinality" ,
175
181
"fieldNames" : ["dim1" ],
176
182
"byRow" : False ,
177
183
},
178
184
{
179
- "name" : "agg8 " ,
185
+ "name" : "agg9 " ,
180
186
"type" : "cardinality" ,
181
187
"fieldNames" : ["dim1" , "dim2" ],
182
188
"byRow" : True ,
183
189
},
184
190
{
185
- "name" : "agg9 " ,
191
+ "name" : "agg10 " ,
186
192
"type" : "thetaSketch" ,
187
193
"fieldName" : "dim1" ,
188
194
"isInputThetaSketch" : False ,
189
195
"size" : 16384 ,
190
196
},
191
197
{
192
- "name" : "agg10 " ,
198
+ "name" : "agg11 " ,
193
199
"type" : "thetaSketch" ,
194
200
"fieldName" : "metric7" ,
195
201
"isInputThetaSketch" : False ,
196
202
"size" : 16384 ,
197
203
},
198
204
{
199
- "name" : "agg11 " ,
205
+ "name" : "agg12 " ,
200
206
"type" : "thetaSketch" ,
201
207
"fieldName" : "metric8" ,
202
208
"isInputThetaSketch" : True ,
0 commit comments