Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/pkg/engine/internal/util/array_list.go

25 lines
469 B

package util //nolint:revive
import (
"github.com/apache/arrow-go/v18/arrow/array"
)
func ArrayListValue(arr *array.List, i int) any {
if arr.Len() == 0 {
return []string{}
}
start, end := arr.ValueOffsets(i)
listValues := arr.ListValues()
switch listValues := listValues.(type) {
case *array.String:
result := make([]string, end-start)
for i := start; i < end; i++ {
result[i-start] = listValues.Value(int(i))
}
return result
}
return nil
}