Fix reduce slice iterators to also separate by name

pull/5196/head
Jonathan A. Sternberg 2016-02-03 17:21:29 -05:00 committed by Ben Johnson
parent d8337acf90
commit 86cec8cea5
2 changed files with 6 additions and 6 deletions

View File

@ -621,7 +621,7 @@ func (itr *floatReduceSliceIterator) reduce() []FloatPoint {
tags := p.Tags.Subset(itr.opt.Dimensions)
// Append point to dimension.
id := tags.ID()
id := p.Name + "\x00" + tags.ID()
g := groups[id]
g.name = p.Name
g.tags = tags
@ -1322,7 +1322,7 @@ func (itr *integerReduceSliceIterator) reduce() []IntegerPoint {
tags := p.Tags.Subset(itr.opt.Dimensions)
// Append point to dimension.
id := tags.ID()
id := p.Name + "\x00" + tags.ID()
g := groups[id]
g.name = p.Name
g.tags = tags
@ -2023,7 +2023,7 @@ func (itr *stringReduceSliceIterator) reduce() []StringPoint {
tags := p.Tags.Subset(itr.opt.Dimensions)
// Append point to dimension.
id := tags.ID()
id := p.Name + "\x00" + tags.ID()
g := groups[id]
g.name = p.Name
g.tags = tags
@ -2724,7 +2724,7 @@ func (itr *booleanReduceSliceIterator) reduce() []BooleanPoint {
tags := p.Tags.Subset(itr.opt.Dimensions)
// Append point to dimension.
id := tags.ID()
id := p.Name + "\x00" + tags.ID()
g := groups[id]
g.name = p.Name
g.tags = tags

View File

@ -272,7 +272,7 @@ func new{{.Name}}SortedMergeIterator(inputs []{{.Name}}Iterator, opt IteratorOpt
}
// Close closes the underlying iterators.
func (itr *{{.name}}SortedMergeIterator) Close() error {
func (itr *{{.name}}SortedMergeIterator) Close() error {
for _, input := range itr.inputs {
input.Close()
}
@ -623,7 +623,7 @@ func (itr *{{.name}}ReduceSliceIterator) reduce() []{{.Name}}Point {
tags := p.Tags.Subset(itr.opt.Dimensions)
// Append point to dimension.
id := tags.ID()
id := p.Name + "\x00" + tags.ID()
g := groups[id]
g.name = p.Name
g.tags = tags