From 40434689b289bfb4079db830776f213233fb009c Mon Sep 17 00:00:00 2001 From: Matthias Loibl Date: Fri, 8 Sep 2023 13:19:00 +0200 Subject: [PATCH] pkg/query: Check individual mapping fields for null --- pkg/query/flamegraph_arrow.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/query/flamegraph_arrow.go b/pkg/query/flamegraph_arrow.go index 07c7bddff47..8b4da00c9fd 100644 --- a/pkg/query/flamegraph_arrow.go +++ b/pkg/query/flamegraph_arrow.go @@ -1010,12 +1010,14 @@ func (fb *flamegraphBuilder) appendRow( fb.builderLabelsOnly.Append(false) - // Mapping - if r.MappingStart.IsValid(locationRow) { + if r.MappingFileIndices.IsValid(locationRow) { fb.builderMappingFileIndices.Append(t.mappingFile.indices.Value(int(r.MappingFileIndices.Value(locationRow)))) - fb.builderMappingBuildIDIndices.Append(t.mappingBuildID.indices.Value(int(r.MappingBuildIDIndices.Value(locationRow)))) } else { fb.builderMappingFileIndices.AppendNull() + } + if r.MappingBuildIDIndices.IsValid(locationRow) { + fb.builderMappingBuildIDIndices.Append(t.mappingBuildID.indices.Value(int(r.MappingBuildIDIndices.Value(locationRow)))) + } else { fb.builderMappingBuildIDIndices.AppendNull() }