File tree 2 files changed +8
-9
lines changed
2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -222,12 +222,7 @@ def context_constructor(params: SnubaParams) -> VirtualColumnContext:
222
222
"sum" : FunctionDefinition (
223
223
internal_function = Function .FUNCTION_SUM ,
224
224
search_type = "duration" ,
225
- arguments = [
226
- ArgumentDefinition (
227
- argument_type = "duration" ,
228
- default_arg = "span.duration" ,
229
- )
230
- ],
225
+ arguments = [ArgumentDefinition (argument_type = "duration" , default_arg = "span.duration" )],
231
226
),
232
227
"avg" : FunctionDefinition (
233
228
internal_function = Function .FUNCTION_AVERAGE ,
@@ -237,7 +232,7 @@ def context_constructor(params: SnubaParams) -> VirtualColumnContext:
237
232
"count" : FunctionDefinition (
238
233
internal_function = Function .FUNCTION_COUNT ,
239
234
search_type = "number" ,
240
- arguments = [ArgumentDefinition (ignored = True )],
235
+ arguments = [ArgumentDefinition (argument_type = "duration" , default_arg = "span.duration" )],
241
236
),
242
237
"p50" : FunctionDefinition (
243
238
internal_function = Function .FUNCTION_P50 ,
Original file line number Diff line number Diff line change @@ -318,12 +318,16 @@ def test_function_alias(self):
318
318
def test_count (self ):
319
319
resolved_column , virtual_context = self .resolver .resolve_column ("count()" )
320
320
assert resolved_column .proto_definition == AttributeAggregation (
321
- aggregate = Function .FUNCTION_COUNT , key = None , label = "count()"
321
+ aggregate = Function .FUNCTION_COUNT ,
322
+ key = AttributeKey (name = "duration_ms" , type = AttributeKey .Type .TYPE_INT ),
323
+ label = "count()" ,
322
324
)
323
325
assert virtual_context is None
324
326
resolved_column , virtual_context = self .resolver .resolve_column ("count(span.duration)" )
325
327
assert resolved_column .proto_definition == AttributeAggregation (
326
- aggregate = Function .FUNCTION_COUNT , key = None , label = "count(span.duration)"
328
+ aggregate = Function .FUNCTION_COUNT ,
329
+ key = AttributeKey (name = "duration_ms" , type = AttributeKey .Type .TYPE_INT ),
330
+ label = "count(span.duration)" ,
327
331
)
328
332
assert virtual_context is None
329
333
You can’t perform that action at this time.
0 commit comments