[ https://issues.apache.org/jira/browse/ARROW-13154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated ARROW-13154: ----------------------------------- Labels: pull-request-available (was: ) > [C++] Unions can not have 126 and 127 as type_codes > --------------------------------------------------- > > Key: ARROW-13154 > URL: https://issues.apache.org/jira/browse/ARROW-13154 > Project: Apache Arrow > Issue Type: Bug > Components: C++ > Reporter: Ying Zhou > Assignee: Ying Zhou > Priority: Minor > Labels: pull-request-available > Fix For: 5.0.0 > > Time Spent: 10m > Remaining Estimate: 0h > > Due to the following in builder_union.cc (Line 67-70) > > {color:#172b4d}{color} > {code:java} > type_id_to_children_.resize(union_type.max_type_code() + 1, nullptr); > DCHECK_LT( > type_id_to_children_.size(), > > static_cast<decltype(type_id_to_children_)::size_type>(UnionType::kMaxTypeCode));{code} > {color:#172b4d} > > and type.cc (Line 640-644) > {color} > {code:java} > uint8_t UnionType::max_type_code() const { > return type_codes_.size() == 0 > ? 0 > : *std::max_element(type_codes_.begin(), type_codes_.end()); > }{code} > > In practice type codes of the union type must always be below or equal to > 125 which is not intended behavior. -- This message was sent by Atlassian Jira (v8.3.4#803005)