alamb commented on PR #7961: URL: https://github.com/apache/arrow-rs/pull/7961#issuecomment-3092290896
> > That last part is my biggest worry -- if it's not safe to physically swap the bytes of two logically equivalent variant objects (because the field ids could go out of sync), what use is logical equivalence? > > Interesting, I wonder if we scope this custom `PartialEq` implementation on `VariantObject` to purely for tests. FWIW I think the major usecase for swapping varaint bytes is likely the creation of shredded values (copying the non shredded parts) In this case, I think what we should do is compare the VariantMetadata (by pointer) and if it is the same we can simply copy the bytes. Maybe we even have a special / optimized method that does this that is used by the shredding code -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org