Support InfluxDB count distinct aggregation (#11658)
influxdb: support count distinct aggregation
This commit is contained in:
committed by
Marcus Efraimsson
parent
f32e3a2960
commit
48fc5edda1
@@ -76,5 +76,13 @@ func TestInfluxdbQueryPart(t *testing.T) {
|
||||
res := part.Render(query, queryContext, "mean(value)")
|
||||
So(res, ShouldEqual, `mean(value) AS "test"`)
|
||||
})
|
||||
|
||||
Convey("render count distinct", func() {
|
||||
part, err := NewQueryPart("count", []string{})
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
res := part.Render(query, queryContext, "distinct(value)")
|
||||
So(res, ShouldEqual, `count(distinct(value))`)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user