Skip to content

Commit

Permalink
revert changes to reader.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
bkietz committed Jul 11, 2019
1 parent 5742db9 commit cf1c5be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cpp/src/arrow/ipc/reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,12 @@ class ArrayLoader {

RETURN_NOT_OK(LoadCommon());
if (out_->length > 0) {
RETURN_NOT_OK(GetBuffer(context_->buffer_index++, &out_->buffers[1]));
RETURN_NOT_OK(GetBuffer(context_->buffer_index, &out_->buffers[1]));
if (type.mode() == UnionMode::DENSE) {
RETURN_NOT_OK(GetBuffer(context_->buffer_index++, &out_->buffers[2]));
RETURN_NOT_OK(GetBuffer(context_->buffer_index + 1, &out_->buffers[2]));
}
}
context_->buffer_index += type.mode() == UnionMode::DENSE ? 2 : 1;
return LoadChildren(type.children());
}

Expand Down
4 changes: 3 additions & 1 deletion python/pyarrow/tests/test_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,13 @@ def custom_deserializer(serialized_obj):


def test_primitive_serialization_notbroken(large_buffer):
serialization_roundtrip({(1,2): 2}, large_buffer)
serialization_roundtrip({(1, 2): 2}, large_buffer)


def test_primitive_serialization_broken(large_buffer):
serialization_roundtrip({(): 2}, large_buffer)


def test_primitive_serialization(large_buffer):
for obj in PRIMITIVE_OBJECTS:
serialization_roundtrip(obj, large_buffer)
Expand Down

0 comments on commit cf1c5be

Please sign in to comment.