You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "liyang (Jira)" <ji...@apache.org> on 2021/12/04 08:12:00 UTC
[jira] [Created] (ARROW-14983) Crash when build arrow::Array using arrow::ArrayBuilder
liyang created ARROW-14983:
------------------------------
Summary: Crash when build arrow::Array using arrow::ArrayBuilder
Key: ARROW-14983
URL: https://issues.apache.org/jira/browse/ARROW-14983
Project: Apache Arrow
Issue Type: Bug
Components: C++
Affects Versions: 5.0.0
Environment: $ uname -a
Linux sg-ch-test006.bigdata.bigo.inner 4.9.70-040970-generic #201712161132 SMP Sat Dec 16 16:33:52 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Reporter: liyang
Reproduce process:
``` cpp
int main()
{
auto value_field = arrow::field("value", arrow::utf8(), false);
auto map_field = arrow::field("evenInfo", arrow::map(arrow::utf8(), value_field), false);
auto map_type = std::dynamic_pointer_cast<arrow::MapType>(map_field->type());
std::cout << "field:" << map_field->ToString() << std::endl;
std::cout << "key_type: " << map_type->key_type()->ToString() << std::endl;
std::cout << "val_type: " << map_type->value_type()->ToString() << std::endl;
std::cout << "item_type: " << map_type->item_type()->ToString() << std::endl;
arrow::MemoryPool * pool = arrow::default_memory_pool();
std::unique_ptr<arrow::ArrayBuilder> array_builder;
arrow::Status status = MakeBuilder(pool, map_field->type(), &array_builder);
std::shared_ptr<arrow::Array> arrow_array;
status = array_builder->Finish(&arrow_array);
std::cout << status.ToString() << std::endl;
}
```
--
This message was sent by Atlassian Jira
(v8.20.1#820001)