Fix #1462: remove limit of 1000 on dedupe field names (#1463)

* Fix #1462: remove limit of 1000 on dedupe field names

* make dev output
This commit is contained in:
John Kerl 2024-01-01 15:50:56 -07:00 committed by GitHub
parent e3b98cd621
commit 2f42c6f508
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 7 deletions

View file

@ -3689,5 +3689,5 @@ MILLER(1) MILLER(1)
2023-12-23 MILLER(1)
2024-01-01 MILLER(1)
</pre>

View file

@ -3668,4 +3668,4 @@ MILLER(1) MILLER(1)
2023-12-23 MILLER(1)
2024-01-01 MILLER(1)

View file

@ -3668,4 +3668,4 @@ MILLER(1) MILLER(1)
2023-12-23 MILLER(1)
2024-01-01 MILLER(1)

View file

@ -2,12 +2,12 @@
.\" Title: mlr
.\" Author: [see the "AUTHOR" section]
.\" Generator: ./mkman.rb
.\" Date: 2023-12-23
.\" Date: 2024-01-01
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "MILLER" "1" "2023-12-23" "\ \&" "\ \&"
.TH "MILLER" "1" "2024-01-01" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Portability definitions
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -74,7 +74,7 @@ func (mlrmap *Mlrmap) PutReferenceMaybeDedupe(key string, value *Mlrval, dedupe
return key, nil
}
for i := 2; i < 1000; i++ {
for i := 2; ; i++ {
newKey := key + "_" + strconv.Itoa(i)
pe := mlrmap.findEntry(newKey)
if pe == nil {
@ -82,7 +82,6 @@ func (mlrmap *Mlrmap) PutReferenceMaybeDedupe(key string, value *Mlrval, dedupe
return newKey, nil
}
}
return key, fmt.Errorf("record has too many input fields named \"%s\"", key)
}
// PutCopy copies the key and value (deep-copying in case the value is array/map).