Skip to content

Commit ed4e6fa

Browse files
authored
Merge pull request #157 from fiinnnn/fix-float64-cast-panic
Fix panic when casting json.Number fields only present in some docs
2 parents 7d4c1ee + 9f30d1e commit ed4e6fa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/quickwit/response_parser.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,9 @@ func processDocsToDataFrameFields(docs []map[string]interface{}, propNames []str
280280
rawPropSlice := getDocPropSlice[json.Number](docs, propName, size)
281281
propSlice := make([]*float64, size)
282282
for i, val := range rawPropSlice {
283+
if val == nil {
284+
continue
285+
}
283286
val_f64, err := val.Float64()
284287
if err == nil {
285288
propSlice[i] = &val_f64

0 commit comments

Comments
 (0)