You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jorisvandenbossche (via GitHub)" <gi...@apache.org> on 2023/03/23 07:54:08 UTC

[GitHub] [arrow] jorisvandenbossche commented on issue #34681: [C++] Array::Equals incorrectly returns true when comparing sized buffer with buffer of size 0

jorisvandenbossche commented on issue #34681:
URL: https://github.com/apache/arrow/issues/34681#issuecomment-1480737829

   I think we might actually also write into the memory (so not just garbage, which makes the test pass consistently for the example), but that's of course just as bad, and indeed when using larger data that gives a segfault at clean-up.
   
   It's true that it is a slippery slope and that you can't start with ensuring the validity of the arrays on any operation. At some point you need to assume you have valid data. 
   I suppose a more appropriate solution here would be to have better testing utilities, like an `assert_equals`-like helper, and then in such a function we could first call `validate()` on the arrays and then `equals`, to avoid such issues. 


-- 
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