mirror of
https://github.com/hanzoai/traces.git
synced 2026-10-30 18:20:41 +00:00
* Experiments with next parquet version. Added rounded start time column * Vparquet5 use lower precision timestamp column when possible based on step interval * microoptimization * leftjoiniterator use dynamic branch reordering, plus other performance improvements * Add columns with other granularities * Add new functionality: nocompactflg and short trace ID search * Fix handling of large step intervals and split between backend and generator requests * Repair tests and reduce divergence from main * Cleanup, separate benchmark env vars * Set version string to preview * rename/comments * Oops undo change to default encoding * Fix tests and lint * Bring in more updates from vparquet4 * Improve accuracy of estimate function, cleanup debug statements * Reduce diff from main * lint * Add test parquet file * Fix to maintain nano-second precision for blocks overlapping query range edges and recent/backend handoff where things don't align * Fix tests after merging main, one more fix to maintain nanosecond precision when needed * changelog * Cleanup/reduce diff from main * Review feedback
47 lines
931 B
Go
47 lines
931 B
Go
package vparquet5
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"github.com/grafana/tempo/tempodb/backend"
|
|
"github.com/grafana/tempo/tempodb/backend/local"
|
|
)
|
|
|
|
func TestRawIteratorReadsAllRows(t *testing.T) {
|
|
rawR, _, _, err := local.New(&local.Config{
|
|
Path: "./test-data",
|
|
})
|
|
require.NoError(t, err)
|
|
|
|
r := backend.NewReader(rawR)
|
|
ctx := context.Background()
|
|
|
|
blocks, _, err := r.Blocks(ctx, "single-tenant")
|
|
require.NoError(t, err)
|
|
require.Len(t, blocks, 1)
|
|
|
|
meta, err := r.BlockMeta(ctx, blocks[0], "single-tenant")
|
|
require.NoError(t, err)
|
|
|
|
b := newBackendBlock(meta, r)
|
|
|
|
iter, err := b.rawIter(context.Background(), newRowPool(10))
|
|
require.NoError(t, err)
|
|
defer iter.Close()
|
|
|
|
actualCount := int64(0)
|
|
for {
|
|
_, tr, err := iter.Next(context.Background())
|
|
if tr == nil {
|
|
break
|
|
}
|
|
actualCount++
|
|
require.NoError(t, err)
|
|
}
|
|
|
|
require.Equal(t, meta.TotalObjects, actualCount)
|
|
}
|