diff --git a/storage/reads/array_cursor.gen.go b/storage/reads/array_cursor.gen.go index 9ef41c3950..8444d92252 100644 --- a/storage/reads/array_cursor.gen.go +++ b/storage/reads/array_cursor.gen.go @@ -55,8 +55,6 @@ func (c *floatArrayFilterCursor) Next() *cursors.FloatArray { if c.tmp.Len() > 0 { a = c.tmp - c.tmp.Timestamps = nil - c.tmp.Values = nil } else { a = c.FloatArrayCursor.Next() } @@ -76,6 +74,12 @@ LOOP: } } } + + // Clear bufferred timestamps & values if we make it through a cursor. + // The break above will skip this if a cursor is partially read. + c.tmp.Timestamps = nil + c.tmp.Values = nil + a = c.FloatArrayCursor.Next() } @@ -271,8 +275,6 @@ func (c *integerArrayFilterCursor) Next() *cursors.IntegerArray { if c.tmp.Len() > 0 { a = c.tmp - c.tmp.Timestamps = nil - c.tmp.Values = nil } else { a = c.IntegerArrayCursor.Next() } @@ -292,6 +294,12 @@ LOOP: } } } + + // Clear bufferred timestamps & values if we make it through a cursor. + // The break above will skip this if a cursor is partially read. + c.tmp.Timestamps = nil + c.tmp.Values = nil + a = c.IntegerArrayCursor.Next() } @@ -487,8 +495,6 @@ func (c *unsignedArrayFilterCursor) Next() *cursors.UnsignedArray { if c.tmp.Len() > 0 { a = c.tmp - c.tmp.Timestamps = nil - c.tmp.Values = nil } else { a = c.UnsignedArrayCursor.Next() } @@ -508,6 +514,12 @@ LOOP: } } } + + // Clear bufferred timestamps & values if we make it through a cursor. + // The break above will skip this if a cursor is partially read. + c.tmp.Timestamps = nil + c.tmp.Values = nil + a = c.UnsignedArrayCursor.Next() } @@ -703,8 +715,6 @@ func (c *stringArrayFilterCursor) Next() *cursors.StringArray { if c.tmp.Len() > 0 { a = c.tmp - c.tmp.Timestamps = nil - c.tmp.Values = nil } else { a = c.StringArrayCursor.Next() } @@ -724,6 +734,12 @@ LOOP: } } } + + // Clear bufferred timestamps & values if we make it through a cursor. + // The break above will skip this if a cursor is partially read. + c.tmp.Timestamps = nil + c.tmp.Values = nil + a = c.StringArrayCursor.Next() } @@ -879,8 +895,6 @@ func (c *booleanArrayFilterCursor) Next() *cursors.BooleanArray { if c.tmp.Len() > 0 { a = c.tmp - c.tmp.Timestamps = nil - c.tmp.Values = nil } else { a = c.BooleanArrayCursor.Next() } @@ -900,6 +914,12 @@ LOOP: } } } + + // Clear bufferred timestamps & values if we make it through a cursor. + // The break above will skip this if a cursor is partially read. + c.tmp.Timestamps = nil + c.tmp.Values = nil + a = c.BooleanArrayCursor.Next() } diff --git a/storage/reads/array_cursor.gen.go.tmpl b/storage/reads/array_cursor.gen.go.tmpl index 931b86380f..c8b9597e07 100644 --- a/storage/reads/array_cursor.gen.go.tmpl +++ b/storage/reads/array_cursor.gen.go.tmpl @@ -54,8 +54,6 @@ func (c *{{$type}}) Next() {{$arrayType}} { if c.tmp.Len() > 0 { a = c.tmp - c.tmp.Timestamps = nil - c.tmp.Values = nil } else { a = c.{{.Name}}ArrayCursor.Next() } @@ -75,6 +73,12 @@ LOOP: } } } + + // Clear bufferred timestamps & values if we make it through a cursor. + // The break above will skip this if a cursor is partially read. + c.tmp.Timestamps = nil + c.tmp.Values = nil + a = c.{{.Name}}ArrayCursor.Next() }