Skip to content

Commit

Permalink
Fix #1462: remove limit of 1000 on dedupe field names (#1463)
Browse files Browse the repository at this point in the history
* Fix #1462: remove limit of 1000 on dedupe field names

* make dev output
  • Loading branch information
johnkerl authored Jan 1, 2024
1 parent e3b98cd commit 2f42c6f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/src/manpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3689,5 +3689,5 @@ MILLER(1) MILLER(1)



2023-12-23 MILLER(1)
2024-01-01 MILLER(1)
</pre>
2 changes: 1 addition & 1 deletion docs/src/manpage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3668,4 +3668,4 @@ MILLER(1) MILLER(1)



2023-12-23 MILLER(1)
2024-01-01 MILLER(1)
2 changes: 1 addition & 1 deletion man/manpage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3668,4 +3668,4 @@ MILLER(1) MILLER(1)



2023-12-23 MILLER(1)
2024-01-01 MILLER(1)
4 changes: 2 additions & 2 deletions man/mlr.1
Original file line number Diff line number Diff line change
Expand Up @@ -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
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
3 changes: 1 addition & 2 deletions pkg/mlrval/mlrmap_accessors.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,14 @@ 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 {
mlrmap.putReferenceNewAux(newKey, value)
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).
Expand Down

0 comments on commit 2f42c6f

Please sign in to comment.