[MODULES-8760] The merge() function should be able to merge iteratively Created: 2019/03/20  Updated: 2019/05/09

Status: Ready for CI
Project: Modules
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Normal
Reporter: Henrik Lindberg Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by PUP-9568 Migrate merge() from stdlib and make ... Closed
Relates
relates to PUP-9561 puppet language functions are 11,350x... Closed
Template:
QA Risk Assessment: Needs Assessment

 Description   

In order to facilitate more performant building of hashes it is of value to let merge() support iterating over an Iterable and where each produced hash is merged into the result. This can currently only be achieved by using reduce() and it has performance issues when merging a large number of hashes as each iteration produces a (growing) copy.

An alternative in Puppet 6 is to use the functions `partition` and `group_by`, but those do not solve the common problem of building a hash from pieces.


Generated at Tue Aug 11 00:42:44 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.