MCPcopy
hub / github.com/grafana/tempo / createNilIterTestFile

Function createNilIterTestFile

pkg/parquetquery/nil_iter_test.go:42–66  ·  view source on GitHub ↗
(t testing.TB, count int)

Source from the content-addressed store, hash-verified

40}
41
42func createNilIterTestFile(t testing.TB, count int) *parquet.File {
43 type Attr struct {
44 Key string `parquet:",snappy,dict"`
45 }
46 type T struct {
47 Attrs []Attr `parquet:"attrs,list"`
48 }
49 genericKeys := []string{"key-1", "key-2", "key-3", "key-4", "key-5"}
50
51 rows := []T{}
52 for i := range count {
53 keys := genericKeys
54 if i%3 == 0 {
55 keys = append(keys, "special-key")
56 }
57 attrs := make([]Attr, 0, len(keys))
58 for _, key := range keys {
59 attrs = append(attrs, Attr{Key: key})
60 }
61 rows = append(rows, T{Attrs: attrs})
62 }
63
64 pf := createFileWith(t, context.Background(), rows)
65 return pf
66}

Callers 1

TestNilIteratorFunction · 0.85

Calls 1

createFileWithFunction · 0.85

Tested by

no test coverage detected