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

Function TestTruncateRowNumber

pkg/parquetquery/iters_test.go:28–37  ·  view source on GitHub ↗

TestTruncate compares the unrolled TruncateRowNumber() with the original truncateRowNumberSlow() to prevent drift

(t *testing.T)

Source from the content-addressed store, hash-verified

26// TestTruncate compares the unrolled TruncateRowNumber() with the original truncateRowNumberSlow() to
27// prevent drift
28func TestTruncateRowNumber(t *testing.T) {
29 for i := 0; i <= MaxDefinitionLevel; i++ {
30 rn := RowNumber{1, 2, 3, 4, 5, 6, 7, 8}
31
32 newR := TruncateRowNumber(i, rn)
33 oldR := truncateRowNumberSlow(i, rn)
34
35 require.Equal(t, newR, oldR)
36 }
37}
38
39func TestInvalidDefinitionLevelTruncate(t *testing.T) {
40 t.Run("TruncateRowNumber -1", func(t *testing.T) {

Callers

nothing calls this directly

Calls 3

TruncateRowNumberFunction · 0.85
truncateRowNumberSlowFunction · 0.85
EqualMethod · 0.45

Tested by

no test coverage detected