Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SELECT * to return tag values #1997

Merged
merged 6 commits into from
May 26, 2015

Conversation

toddboom
Copy link
Contributor

Users are getting confused by the fact that SELECT * doesn't include tag values. We should include tag keys in the columns and the tag values in the values array.

@pauldix pauldix added this to the 0.9.0 milestone Mar 18, 2015
@dashesy
Copy link

dashesy commented Mar 18, 2015

why not include them in a tags section? Whatever goes in comes out, and when pushing tags are clearly separate.

@pauldix
Copy link
Member Author

pauldix commented Mar 25, 2015

@dashesy they are included in the tags section if you add GROUP BY * to the query. The problem is that people don't really know about this so when they do the query and see no tags they think it's broken. I guess we could just update the default behavior to make SELECT * force a GROUP BY *

@dashesy
Copy link

dashesy commented Mar 25, 2015

@pauldix yes that seems to have the least surprise (it threw me off too when I first tried it), it helps to know * will return everything.

@jnutzmann
Copy link

I think it could be very useful to to optionally include tags in the results, rather than just in the tags sections.

An example of where this would be used is I have a database of events that happened from multiple machines. I store data like event_code, device_id, etc in tags. When I query the data, I might only specify to search for a single device (multiple codes) or a single code (multiple devices). I want the results to in sequential order (by time). If you have it in the group by, I have to manually merge the series together to get one list and also know which device or event code it is associated with. Returning them in the query results would solve this (it would essentially identify which unique series the data originated from).

Also, FYI... When I tried to run a query like SELECT value, my_tag FROM my_series WHERE ..., the server panics and stops (due to the tag being in the select). I didn't add a bug for this because this and #1989 already exist.

@manuel-huez
Copy link

+1

@toddboom toddboom modified the milestones: 0.9.0, 0.9.1 May 8, 2015
@toddboom toddboom self-assigned this May 11, 2015
@toddboom toddboom force-pushed the fix-1997-include-tags-in-select-wildcard branch from 3b1de5e to ea5d8e8 Compare May 22, 2015 23:34
@dgnorton
Copy link
Contributor

+1 lgtm

toddboom added a commit that referenced this pull request May 26, 2015
…t-wildcard

Update SELECT * to return tag values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants