[
https://issues.apache.org/jira/browse/ARROW-6470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wamsi Viswanath updated ARROW-6470:
-----------------------------------
Description:
Below is a simple reproducible example, please let me know if the behavior is
valid:
```
#include <arrow/api.h>
#include <arrow/io/memory.h>
#include <arrow/ipc/api.h>
#include <cstdio>
#include <iostream>
int main()
{ std::shared_ptr<arrow::Schema> schema = arrow::schema(\\{arrow::field("int_",
arrow::int32(), false)}
);
std::vector<std::shared_ptr<arrow::Array>> arrays = {};
std::shared_ptr<arrow::RecordBatch> record_batch =
arrow::RecordBatch::Make(schema, arrays[0]->length(), arrays);
std::shared_ptr<arrow::Buffer> serialized_buffer;
if (!arrow::ipc::SerializeRecordBatch(
*record_batch, arrow::default_memory_pool(), &serialized_buffer)
.ok())
{ throw std::runtime_error("Error: Serializing Records."); }
}
```
was:
Below is a simple reproducible example, please let me know if the behavior is
valid:
```
#include <arrow/api.h>
#include <arrow/io/memory.h>
#include <arrow/ipc/api.h>
#include <cstdio>
#include <iostream>
int main() {
std::shared_ptr<arrow::Schema> schema =
arrow::schema(\{arrow::field("int_", arrow::int32(), false)});
std::vector<std::shared_ptr<arrow::Array>> arrays = {};
std::shared_ptr<arrow::RecordBatch> record_batch =
arrow::RecordBatch::Make(schema, arrays[0]->length(), arrays);
std::shared_ptr<arrow::Buffer> serialized_buffer;
if (!arrow::ipc::SerializeRecordBatch(
*record_batch, arrow::default_memory_pool(), &serialized_buffer)
.ok()) {
throw std::runtime_error("Error: Serializing Records.");
}
}
```
> Segmentation fault when trying to serialzie empty SerializeRecordBatch
> -----------------------------------------------------------------------
>
> Key: ARROW-6470
> URL: https://issues.apache.org/jira/browse/ARROW-6470
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Affects Versions: 0.13.0
> Reporter: Wamsi Viswanath
> Priority: Major
>
> Below is a simple reproducible example, please let me know if the behavior is
> valid:
> ```
> #include <arrow/api.h>
> #include <arrow/io/memory.h>
> #include <arrow/ipc/api.h>
> #include <cstdio>
> #include <iostream>
> int main()
> { std::shared_ptr<arrow::Schema> schema =
> arrow::schema(\\{arrow::field("int_", arrow::int32(), false)}
> );
> std::vector<std::shared_ptr<arrow::Array>> arrays = {};
> std::shared_ptr<arrow::RecordBatch> record_batch =
> arrow::RecordBatch::Make(schema, arrays[0]->length(), arrays);
> std::shared_ptr<arrow::Buffer> serialized_buffer;
> if (!arrow::ipc::SerializeRecordBatch(
> *record_batch, arrow::default_memory_pool(), &serialized_buffer)
> .ok())
> { throw std::runtime_error("Error: Serializing Records."); }
> }
> ```
--
This message was sent by Atlassian Jira
(v8.3.2#803003)