Support InfluxDB count distinct aggregation (#11658)

influxdb: support count distinct aggregation
This commit is contained in:
Kim Christensen
2018-05-30 09:22:16 +02:00
committed by Marcus Efraimsson
parent f32e3a2960
commit 48fc5edda1
3 changed files with 175 additions and 0 deletions
+8
View File
@@ -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))`)
})
})
}