Commits


Thor authored and GitHub committed adfd482518c
GH-36671: [Go] BinaryMemoTable optimize allocations of GetOrInsert (#36811) ### Rationale for this change The hashing.MemoTable provides an interface with GetOrInsert(val interface{}) (idx int, existed bool, err error) This can cause a costly allocation for binary dictionaries as is detailed in issue https://github.com/apache/arrow/issues/36671 If we expand the MemoTable interface to include: GetOrInsertBytes(val []byte) (idx int, existed bool, err error) We can avoid the allocations at runtime to convert from `[]byte` to `interface{}` ### What changes are included in this PR? No logic was changed with the BinaryMemoTable but instead the same API for `GetOrInsert` was copied to a type specific API of `GetOrInsertBytes`. The `BinaryDictionaryBuilder` now simple calls these bytes methods instead of the generic `interface{}` ones. ### Are these changes tested? No additional tests were included as the current tests exercise this code. ### Are there any user-facing changes? * Closes: #36671 Authored-by: thorfour <me@thor-hansen.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>