-
Notifications
You must be signed in to change notification settings - Fork 811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Struct equality on slices has false negatives #514
Comments
I think the problem here may be more widespread than I originall thought. It looks like the equality methods are inconsistent in how they handle offset. For instance:
This starts has
This uses the I can a stab at fixing it for at least the case identified, but I'm somewhat curious what the intended approach is. It seems like there are two options:
It seems like option 2 is most consistent with how things are currently implemented. |
I think that #389 seems to have fixed this. I'll make a PR with the corresponding test case to prevent regression. |
Hrm, upon closer inspection, that didn't fix this. The tests are still failing, and I think I'm outside my depth debugging. It looks like something isn't lining up with the null bits or the null counts in the sliced structs. @nevi-me do you have any ideas on what may be failing, or suggestions for how to find t he problems? I don't have a strong enough grasp on how it's expected to work, so it's unclear what is wrong when I'm debugging. Any hints would be helpful. |
@bjchambers -- #691 (comment) fixed something related to equality of lists, perhaps it is related to this one as well |
I believe this was fixed by #1589, either way the test now passes |
Describe the bug
A struct array that is sliced to a subset is not equal to a struct array created from just that subset of data. Stepping through the debugger I think it is because some of the null/value comparisons drop the offset and end up comparing the wrong part of the array.
To Reproduce
Failing test case here:
bjchambers@ccc8a4c
Expected behavior
Struct array slices compare equal to equivalent struct arrays.
Or, the printing of the struct arrays shows how they differ.
The text was updated successfully, but these errors were encountered: