Use Measurement name, not a column "name"

This results in proper Measurement output.
pull/3942/head
Philip O'Toole 2015-09-01 20:08:01 -07:00
parent 14c04eb4d6
commit 8efb3fb7d8
1 changed files with 1 additions and 4 deletions

View File

@ -125,12 +125,9 @@ func (s *Service) executeShowStatistics(q *influxql.ShowStatsStatement) *influxq
rows := make([]*influxql.Row, len(stats)) rows := make([]*influxql.Row, len(stats))
for n, stat := range stats { for n, stat := range stats {
row := &influxql.Row{} row := &influxql.Row{Name: stat.Name}
values := make([]interface{}, 0, len(stat.Tags)+len(stat.Values)) values := make([]interface{}, 0, len(stat.Tags)+len(stat.Values))
row.Columns = append(row.Columns, "name")
values = append(values, stat.Name)
for _, k := range stat.tagNames() { for _, k := range stat.tagNames() {
row.Columns = append(row.Columns, k) row.Columns = append(row.Columns, k)
values = append(values, stat.Tags[k]) values = append(values, stat.Tags[k])