We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent faedd54 commit 0381450Copy full SHA for 0381450
arrow/schema.go
@@ -18,6 +18,7 @@ package arrow
18
19
import (
20
"fmt"
21
+ "maps"
22
"slices"
23
"strings"
24
@@ -136,20 +137,7 @@ func (md Metadata) sortedIndices() []int {
136
137
}
138
139
func (md Metadata) Equal(rhs Metadata) bool {
- if md.Len() != rhs.Len() {
140
- return false
141
- }
142
-
143
- idxes := md.sortedIndices()
144
- rhsIdxes := rhs.sortedIndices()
145
- for i := range idxes {
146
- j := idxes[i]
147
- k := rhsIdxes[i]
148
- if md.keys[j] != rhs.keys[k] || md.values[j] != rhs.values[k] {
149
150
151
152
- return true
+ return maps.Equal(md.ToMap(), rhs.ToMap())
153
154
155
// Schema is a sequence of Field values, describing the columns of a table or
0 commit comments