Re: [C++] Maximum type code for union types

2021-06-23 Thread Ying Zhou
Thanks! Issue filed. I will work on it. https://issues.apache.org/jira/browse/ARROW-13154 > On Jun 20, 2021, at 5:26 PM, Wes McKinney wrote: > > UnionType::kMaxTypeCode is 127, so we intend to have codes from 0 to > 127. If there is code preventing things from going up to and including > 127

Re: [C++] Maximum type code for union types

2021-06-20 Thread Wes McKinney
UnionType::kMaxTypeCode is 127, so we intend to have codes from 0 to 127. If there is code preventing things from going up to and including 127 it's a bug. On Sun, Jun 20, 2021 at 3:06 PM Ying Zhou wrote: > > Moreover it seems that negative type_codes are banned due to type.cc:622 >

[C++] Maximum type code for union types

2021-06-20 Thread Ying Zhou
Hi, Due to the following in builder_union.cc (Line 67-70) type_id_to_children_.resize(union_type.max_type_code() + 1, nullptr); DCHECK_LT( type_id_to_children_.size(), static_cast(UnionType::kMaxTypeCode)); and type.cc (Line 640-644)

Re: [C++] Maximum type code for union types

2021-06-20 Thread Ying Zhou
Moreover it seems that negative type_codes are banned due to type.cc:622 . Moreover in type_test.cc and array_union_test.cc type_codes are always nonnegative. However maybe negative type_codes should be allowed since