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

Method ToMap

pkg/parquetquery/iters.go:242–248  ·  view source on GitHub ↗

ToMap converts the unstructured list of data into a map containing an entry for each column, and the lists of values. The order of columns is not preseved, but the order of values within each column is.

()

Source from the content-addressed store, hash-verified

240// for each column, and the lists of values. The order of columns is
241// not preseved, but the order of values within each column is.
242func (r *IteratorResult) ToMap() map[string][]pq.Value {
243 m := map[string][]pq.Value{}
244 for _, e := range r.Entries {
245 m[e.Key] = append(m[e.Key], e.Value)
246 }
247 return m
248}
249
250// Columns gets the values for each named column. The order of returned values
251// matches the order of names given. This is more efficient than converting to a map.

Callers 6

rawToResultsFunction · 0.80
rawToResultsFunction · 0.80
rawToResultsFunction · 0.80
testColumnIteratorFunction · 0.80
testColumnIteratorSeekFunction · 0.80

Calls

no outgoing calls

Tested by 3

testColumnIteratorFunction · 0.64
testColumnIteratorSeekFunction · 0.64