From 20011cffadd9521e768656df61f56008d7fca964 Mon Sep 17 00:00:00 2001 From: Ales Pour Date: Thu, 5 Sep 2024 14:08:26 +0200 Subject: [PATCH] fix: do not initialize maps for schema with initial size --- cmd/influx_tools/parquet/exporter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/influx_tools/parquet/exporter.go b/cmd/influx_tools/parquet/exporter.go index 57be99093fc..a2e7d14a09e 100644 --- a/cmd/influx_tools/parquet/exporter.go +++ b/cmd/influx_tools/parquet/exporter.go @@ -195,11 +195,11 @@ func (e *exporter) shardSchema(shard *tsdb.Shard) (*index.MeasurementSchema, err return nil, nil } - tagSet := make(map[string]struct{}, len(tagKeys)) + tagSet := make(map[string]struct{}) for _, key := range tagKeys[0].Keys { tagSet[key] = struct{}{} } - fieldSet := make(map[index.MeasurementField]struct{}, fields.FieldN()) + fieldSet := make(map[index.MeasurementField]struct{}) for name, field := range fields.FieldSet() { blockType, err := tsm1.BlockTypeForType(field.Zero()) if err != nil {