You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "zeroshade (via GitHub)" <gi...@apache.org> on 2023/05/31 14:32:12 UTC

[GitHub] [arrow] zeroshade commented on a diff in pull request #35823: GH-35828: [Go] Add `array.WithUnorderedMapKeys` option for `array.ApproxEqual`

zeroshade commented on code in PR #35823:
URL: https://github.com/apache/arrow/pull/35823#discussion_r1211819426


##########
go/arrow/array/compare.go:
##########
@@ -450,6 +451,13 @@ func WithAbsTolerance(atol float64) EqualOption {
 	}
 }
 
+// WithUnorderedMapKeys configures the comparison functions so that Map with different entries order are considered equal.
+func WithUnorderedMapKeys(v bool) EqualOption {
+	return func(o *equalOption) {
+		o.unorderedMapKeys = v
+	}
+}

Review Comment:
   Would it make more sense to use the `KeysSorted` member of the `MapType` in the Array?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org