mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 11:05:55 +08:00
fix: add support for count aggregate attribute (#2584)
This commit is contained in:
parent
51f1d0fd05
commit
60b78e94d8
@ -3806,7 +3806,9 @@ func (r *ClickHouseReader) GetLogAggregateAttributes(ctx context.Context, req *v
|
|||||||
|
|
||||||
where := ""
|
where := ""
|
||||||
switch req.Operator {
|
switch req.Operator {
|
||||||
case v3.AggregateOperatorCountDistinct:
|
case
|
||||||
|
v3.AggregateOperatorCountDistinct,
|
||||||
|
v3.AggregateOpeatorCount:
|
||||||
where = "tagKey ILIKE $1"
|
where = "tagKey ILIKE $1"
|
||||||
case
|
case
|
||||||
v3.AggregateOperatorRateSum,
|
v3.AggregateOperatorRateSum,
|
||||||
@ -3829,7 +3831,6 @@ func (r *ClickHouseReader) GetLogAggregateAttributes(ctx context.Context, req *v
|
|||||||
v3.AggregateOperatorMax:
|
v3.AggregateOperatorMax:
|
||||||
where = "tagKey ILIKE $1 AND (tagDataType='int64' or tagDataType='float64')"
|
where = "tagKey ILIKE $1 AND (tagDataType='int64' or tagDataType='float64')"
|
||||||
case
|
case
|
||||||
v3.AggregateOpeatorCount,
|
|
||||||
v3.AggregateOperatorNoOp:
|
v3.AggregateOperatorNoOp:
|
||||||
return &v3.AggregateAttributeResponse{}, nil
|
return &v3.AggregateAttributeResponse{}, nil
|
||||||
default:
|
default:
|
||||||
@ -4228,7 +4229,9 @@ func (r *ClickHouseReader) GetTraceAggregateAttributes(ctx context.Context, req
|
|||||||
var response v3.AggregateAttributeResponse
|
var response v3.AggregateAttributeResponse
|
||||||
where := ""
|
where := ""
|
||||||
switch req.Operator {
|
switch req.Operator {
|
||||||
case v3.AggregateOperatorCountDistinct:
|
case
|
||||||
|
v3.AggregateOperatorCountDistinct,
|
||||||
|
v3.AggregateOpeatorCount:
|
||||||
where = "tagKey ILIKE $1"
|
where = "tagKey ILIKE $1"
|
||||||
case
|
case
|
||||||
v3.AggregateOperatorRateSum,
|
v3.AggregateOperatorRateSum,
|
||||||
@ -4251,7 +4254,6 @@ func (r *ClickHouseReader) GetTraceAggregateAttributes(ctx context.Context, req
|
|||||||
v3.AggregateOperatorMax:
|
v3.AggregateOperatorMax:
|
||||||
where = "tagKey ILIKE $1 AND dataType='float64'"
|
where = "tagKey ILIKE $1 AND dataType='float64'"
|
||||||
case
|
case
|
||||||
v3.AggregateOpeatorCount,
|
|
||||||
v3.AggregateOperatorNoOp:
|
v3.AggregateOperatorNoOp:
|
||||||
return &v3.AggregateAttributeResponse{}, nil
|
return &v3.AggregateAttributeResponse{}, nil
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user