Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions queryable/parquet_queryable.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ func (p parquetQuerier) LabelValues(ctx context.Context, name string, hints *pro
if err != nil {
return nil, nil, err
}
span.SetAttributes(
attribute.Int("shards_count", len(shards)),
)

limit := int64(0)

Expand Down Expand Up @@ -212,6 +215,9 @@ func (p parquetQuerier) LabelNames(ctx context.Context, hints *prom_storage.Labe
if err != nil {
return nil, nil, err
}
span.SetAttributes(
attribute.Int("shards_count", len(shards)),
)

limit := int64(0)

Expand Down Expand Up @@ -281,6 +287,11 @@ func (p parquetQuerier) Select(ctx context.Context, sorted bool, sp *prom_storag
minT, maxT = sp.Start, sp.End
}
skipChunks := sp != nil && sp.Func == "series"
span.SetAttributes(
attribute.Int("shards_count", len(shards)),
attribute.Bool("skip_chunks", skipChunks),
)

errGroup, ctx := errgroup.WithContext(ctx)
errGroup.SetLimit(p.opts.concurrency)

Expand All @@ -296,11 +307,6 @@ func (p parquetQuerier) Select(ctx context.Context, sorted bool, sp *prom_storag
return prom_storage.ErrSeriesSet(err)
}

span.SetAttributes(
attribute.Int("shards_count", len(shards)),
attribute.Bool("skip_chunks", skipChunks),
)

ss := convert.NewMergeChunkSeriesSet(seriesSet, labels.Compare, prom_storage.NewConcatenatingChunkSeriesMerger())

return convert.NewSeriesSetFromChunkSeriesSet(ss, skipChunks)
Expand Down
6 changes: 3 additions & 3 deletions search/constraint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,9 @@ type mockConstraint struct {
pathName string
}

func (m *mockConstraint) String() string { return fmt.Sprintf("mock(%s)", m.pathName) }
func (m *mockConstraint) path() string { return m.pathName }
func (m *mockConstraint) init(f *storage.ParquetFile) error { return nil }
func (m *mockConstraint) String() string { return fmt.Sprintf("mock(%s)", m.pathName) }
func (m *mockConstraint) path() string { return m.pathName }
func (m *mockConstraint) init(f storage.ParquetFileView) error { return nil }
func (m *mockConstraint) filter(ctx context.Context, rgIdx int, primary bool, rr []RowRange) ([]RowRange, error) {
return rr, nil
}
Expand Down