You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Will Jones (Jira)" <ji...@apache.org> on 2021/12/06 15:34:00 UTC
[jira] [Commented] (ARROW-14983) Crash when build arrow::Array using arrow::ArrayBuilder
[ https://issues.apache.org/jira/browse/ARROW-14983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17454084#comment-17454084 ]
Will Jones commented on ARROW-14983:
------------------------------------
Thanks for the report. I believe this is the same issue as ARROW-13735, so marking as duplicate of that. Is that the PR you were referring to in the description?
> 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
> Priority: Major
>
> Reproduce process:
> BTW, after using this PR, the crash disappeared.
> {code: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;
> return 0;
> }
> {code}
> error log:
> {code:bash}
> Check failed: self->list_type_->value_type()->Equals(data->child_data[0]->type)
> {code}
> crash backtrace as below:
> {code:bash}
> #0 0x00007fcdd893118b in raise () from /usr/lib/x86_64-linux-gnu/libc.so.6
> (gdb) bt
> #0 0x00007fcdd893118b in raise () from /usr/lib/x86_64-linux-gnu/libc.so.6
> #1 0x00007fcdd8910859 in abort () from /usr/lib/x86_64-linux-gnu/libc.so.6
> #2 0x000000000e39c209 in arrow::util::CerrLog::~CerrLog() ()
> #3 0x000000000e39c239 in arrow::util::CerrLog::~CerrLog() ()
> #4 0x000000000e39be90 in arrow::util::ArrowLog::~ArrowLog() ()
> #5 0x000000000d93ddf0 in void arrow::internal::SetListData<arrow::ListType>(arrow::BaseListArray<arrow::ListType>*, std::__1::shared_ptr<arrow::ArrayData> const&, arrow::Type::type) ()
> #6 0x000000000d935e4d in arrow::MapArray::SetData(std::__1::shared_ptr<arrow::ArrayData> const&) ()
> #7 0x000000000d935c13 in arrow::MapArray::MapArray(std::__1::shared_ptr<arrow::ArrayData> const&) ()
> #8 0x000000000d9cab30 in std::__1::__shared_ptr_emplace<arrow::MapArray, std::__1::allocator<arrow::MapArray> >::__shared_ptr_emplace<std::__1::shared_ptr<arrow::ArrayData> const&>(std::__1::allocator<arrow::MapArray>, std::__1::shared_ptr<arrow::ArrayData> const&) ()
> #9 0x000000000d9caa2f in std::__1::shared_ptr<arrow::MapArray> std::__1::allocate_shared<arrow::MapArray, std::__1::allocator<arrow::MapArray>, std::__1::shared_ptr<arrow::ArrayData> const&, void>(std::__1::allocator<arrow::MapArray> const&, std::__1::shared_ptr<arrow::ArrayData> const&) ()
> #10 0x000000000d9ca9ae in std::__1::shared_ptr<arrow::MapArray> std::__1::make_shared<arrow::MapArray, std::__1::shared_ptr<arrow::ArrayData> const&, void>(std::__1::shared_ptr<arrow::ArrayData> const&) ()
> #11 0x000000000d9bd20f in arrow::Status arrow::(anonymous namespace)::ArrayDataWrapper::Visit<arrow::MapType>(arrow::MapType const&) ()
> #12 0x000000000d9aebfb in arrow::Status arrow::VisitTypeInline<arrow::(anonymous namespace)::ArrayDataWrapper>(arrow::DataType const&, arrow::(anonymous namespace)::ArrayDataWrapper*) ()
> #13 0x000000000d9ae2e2 in arrow::MakeArray(std::__1::shared_ptr<arrow::ArrayData> const&) ()
> #14 0x000000000d94d62f in arrow::ArrayBuilder::Finish(std::__1::shared_ptr<arrow::Array>*) ()
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)