Skip to content

Commit

Permalink
Temporarily compare buffer data lengths, not capacity
Browse files Browse the repository at this point in the history
After slicing buffers, we can end up with 2 buffers having the same len and data, but not capacity.
Such buffers fail the equality test.

CC @sunchao  jorgecarleitao as you've worked on this.
Perhaps we can find a suitable definition of equality, as we're otherwise failing integration tests because of this.
  • Loading branch information
nevi-me committed Oct 10, 2020
1 parent 261c021 commit 69f4ef3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/arrow/src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct BufferData {

impl PartialEq for BufferData {
fn eq(&self, other: &BufferData) -> bool {
if self.capacity != other.capacity {
if self.len != other.len {
return false;
}

Expand Down

0 comments on commit 69f4ef3

Please sign in to comment.