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

Function GetColumnIndexByPath

pkg/parquetquery/util.go:9–23  ·  view source on GitHub ↗
(pf *pq.File, s string)

Source from the content-addressed store, hash-verified

7)
8
9func GetColumnIndexByPath(pf *pq.File, s string) (index, depth, maxDef int) {
10 colSelector := strings.Split(s, ".")
11 n := pf.Root()
12 for len(colSelector) > 0 {
13 n = n.Column(colSelector[0])
14 if n == nil {
15 return -1, -1, -1
16 }
17
18 colSelector = colSelector[1:]
19 depth++
20 }
21
22 return n.Index(), depth, n.MaxDefinitionLevel()
23}
24
25func HasColumn(pf *pq.File, s string) bool {
26 index, _, _ := GetColumnIndexByPath(pf, s)

Callers 15

rawIterMethod · 0.92
findTraceByIDFunction · 0.92
rowIteratorMethod · 0.92
rawIterMethod · 0.92
rowIteratorMethod · 0.92
rawIterMethod · 0.92
findTraceByIDFunction · 0.92
rowIteratorMethod · 0.92
getAllTraceIDsFunction · 0.92

Calls

no outgoing calls

Tested by 6

getAllTraceIDsFunction · 0.74
TestNilIteratorFunction · 0.68
testColumnIteratorFunction · 0.68
testColumnIteratorSeekFunction · 0.68
benchmarkColumnIteratorFunction · 0.68