Some debugging

Change-Id: I47af06be9407c0b7eb39e0fb8cd37970e8eeeb67
This commit is contained in:
Wes McKinney committed 2016-10-09 10:16:03 -04:00
1 parent ca1562b71d
commit 2c49cd4df9
3 files changed
+10 -1

No files matched your search

+2
View File
@@ -165,6 +165,8 @@ class RecordBatchWriter {
// The buffer might be null if we are handling zero row lengths.
if (buffer) {
DCHECK(buffer->capacity() >= buffer->size());
// We use capacity here, because size might not reflect the padding
// requirements of buffers but capacity always should.
size = buffer->capacity();
+7 -1
View File
@@ -60,9 +60,12 @@ def test_ipc_simple_roundtrip():
def big_batch():
df = pd.DataFrame(
np.random.randn(2**4, 2**23).T,
np.random.randn(2**4, 2**20).T,
columns=[str(i) for i in range(2**4)]
)
df = pd.concat([df] * 2 ** 3, ignore_index=True)
return A.RecordBatch.from_pandas(df)
@@ -82,3 +85,6 @@ def read_file(source):
reader = ipc.ArrowFileReader(source)
return [reader.get_record_batch(i)
for i in range(reader.num_record_batches)]
batch = big_batch()
mem = write_to_memory(batch)
+1
View File
@@ -120,6 +120,7 @@ class PYARROW_EXPORT NumPyBuffer : public arrow::Buffer {
data_ = reinterpret_cast<const uint8_t*>(PyArray_DATA(arr_));
size_ = PyArray_SIZE(arr_);
capacity_ = size_;
}
virtual ~NumPyBuffer() {