fix(query): add additional unit tests for series cardinality query rewriting

pull/14444/head
Adam Perlin 2019-07-24 17:06:14 -07:00
parent d6e34bb3e0
commit 7cdebbe422
1 changed files with 10 additions and 2 deletions

View File

@ -125,8 +125,16 @@ func TestRewriteStatement(t *testing.T) {
s: `SELECT _seriesKey AS "key" FROM mydb.myrp1./c.*/ WHERE time > 0`,
},
{
stmt: `SHOW SERIES EXACT CARDINALITY on m`,
s: `SELECT count(distinct(_seriesKey)) AS count FROM m../.+/`,
stmt: `SHOW SERIES CARDINALITY FROM m`,
s: `SELECT count(distinct(_seriesKey)) AS count FROM m`,
},
{
stmt: `SHOW SERIES EXACT CARDINALITY`,
s: `SELECT count(distinct(_seriesKey)) AS count FROM /.+/`,
},
{
stmt: `SHOW SERIES EXACT CARDINALITY FROM m`,
s: `SELECT count(distinct(_seriesKey)) AS count FROM m`,
},
{
stmt: `SHOW TAG KEYS`,