Skip to content

[0.9.3] (regression) cannot use GROUP BY * with more than a single field in SELECT clause #3978

Closed
@beckettsean

Description

Using GROUP BY * with more than a single field in the SELECT clause leads to ERR: error parsing query: wildcards can not be combined with other fields

> insert groupbystar,foo=a,bar=b value1=1,value2=2
> insert groupbystar,foo=a,bar=b value1=2,value2=3
> insert groupbystar,foo=c,bar=d value1=2,value2=3
> insert groupbystar,foo=c,bar=b value1=2,value2=3
> insert groupbystar,foo=a,bar=d value1=2,value2=3
> select * from groupbystar
name: groupbystar
-----------------
time                bar foo value1  value2
2015-09-03T20:37:47.443429272Z  b   a   1   2
2015-09-03T20:37:51.916076836Z  b   a   2   3
2015-09-03T20:37:57.515262942Z  d   c   2   3
2015-09-03T20:38:00.755724348Z  b   c   2   3
2015-09-03T20:38:06.005256776Z  d   a   2   3

> select value1 from groupbystar group by *
name: groupbystar
tags: bar=b, foo=a
time                value1
----                ------
2015-09-03T20:37:47.443429272Z  1
2015-09-03T20:37:51.916076836Z  2


name: groupbystar
tags: bar=b, foo=c
time                value1
----                ------
2015-09-03T20:38:00.755724348Z  2


name: groupbystar
tags: bar=d, foo=a
time                value1
----                ------
2015-09-03T20:38:06.005256776Z  2


name: groupbystar
tags: bar=d, foo=c
time                value1
----                ------
2015-09-03T20:37:57.515262942Z  2

All good to this point. Now add a GROUP BY * and the problem shows up.

> select value1, value2 from groupbystar group by *
ERR: error parsing query: wildcards can not be combined with other fields

The error happens whether the additional column is a field, as above, or a tag, as follows:

> select value1, foo from groupbystar
name: groupbystar
-----------------
time                value1  foo
2015-09-03T20:37:47.443429272Z  1   a
2015-09-03T20:37:51.916076836Z  2   a
2015-09-03T20:37:57.515262942Z  2   c
2015-09-03T20:38:00.755724348Z  2   c
2015-09-03T20:38:06.005256776Z  2   a

> select value1, foo from groupbystar group by *
ERR: error parsing query: wildcards can not be combined with other fields

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions