Commits


Alex Shcherbakov authored and GitHub committed d9c2d596176
GH-35828: [Go] Add `array.WithUnorderedMapKeys` option for `array.ApproxEqual` (#35823) ### Rationale for this change If we store the value of the `*array.Map` into Go map we can't expect to put the values back in the same order, as the map traversal order in Go is undefined. This PR extends `array.ApproxEqual` by allowing map keys to be in different order. ### What changes are included in this PR? New helper functions: * `array.arrayApproxEqualMap` that is now used instead of `array.arrayApproxEqualList` for map comparison * `array.arrayApproxEqualSingleMapEntry` that checks if the single map entry we have matches to the other one without having keys sorted the same way ### Are these changes tested? 1. Newly added test `array.TestArrayApproxEqualMaps` 2. https://github.com/cloudquery/cloudquery/pull/11078 ### Are there any user-facing changes? New `array.WithUnorderedMapKeys` option for `array.ApproxEqual` that allows users to control if the entries order is important or not. * Closes: #35828 Authored-by: candiduslynx <candiduslynx@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>