mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 00:55:55 +00:00
make sure setArray isn't copying mapped data addresses by accident in unionInPlace
This commit is contained in:
parent
99d865c2ea
commit
7841a660a8
1 changed files with 4 additions and 1 deletions
|
|
@ -3779,7 +3779,10 @@ func unionArrayArrayInPlace(a, b *Container) *Container {
|
|||
// for InPlace, we actually want to ensure that
|
||||
// we update a, as long as it's not frozen.
|
||||
a = a.Thaw()
|
||||
a.setArray(b.array())
|
||||
// ... but we also want to be sure we don't end up
|
||||
// copying in a mapped object into our not-mapped
|
||||
// object.
|
||||
a.setArrayMaybeCopy(b.array(), b.Mapped())
|
||||
return a.optimize()
|
||||
}
|
||||
return a
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue