Skip to content

Commit

Permalink
Fix the subset method on tags
Browse files Browse the repository at this point in the history
If a point had no tags at all and was asked for the subset of tags with
at least one key, it would return a new set of tags that was completely
empty. In contrast, if the point had any tags at all, it would return a
set of tags with the tag value being an empty string. This lead to
a point with no tags being treated differently than a point with at
least one tag.

Fixing this so the tag value will always be an empty string for
consistency. A missing tag should always be empty.
  • Loading branch information
jsternberg committed Apr 11, 2016
1 parent 23e2c40 commit ca534bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [#6257](https://github.com/influxdata/influxdb/issues/6257): CreateShardGroup was incrementing meta data index even when it was idempotent.
- [#6223](https://github.com/influxdata/influxdb/issues/6223): Failure to start/run on Windows. Thanks @mvadu
- [#6229](https://github.com/influxdata/influxdb/issues/6229): Fixed aggregate queries with no GROUP BY to include the end time.
- [#6283](https://github.com/influxdata/influxdb/pull/6283): Fix GROUP BY tag to produce consistent results when a series has no tags.

## v0.12.0 [2016-04-05]
### Release Notes
Expand Down
2 changes: 1 addition & 1 deletion influxql/point.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (t *Tags) Value(k string) string {

// Subset returns a new tags object with a subset of the keys.
func (t *Tags) Subset(keys []string) Tags {
if t.m == nil || len(keys) == 0 {
if len(keys) == 0 {
return Tags{}
}

Expand Down

0 comments on commit ca534bf

Please sign in to comment.