Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] Unions can not have 126 and 127 as type_codes #28854

Closed
asfimport opened this issue Jun 23, 2021 · 1 comment
Closed

[C++] Unions can not have 126 and 127 as type_codes #28854

asfimport opened this issue Jun 23, 2021 · 1 comment

Comments

@asfimport
Copy link
Collaborator

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<decltype(type_id_to_children_)::size_type>(UnionType::kMaxTypeCode));

and type.cc (Line 640-644)

uint8_t UnionType::max_type_code() const {
 return type_codes_.size() == 0
 ? 0
 : *std::max_element(type_codes_.begin(), type_codes_.end());
 }

 
In practice type codes of the union type must always be below or equal to 125 which is not intended behavior.

Reporter: Ian Alexander Joiner / @iajoiner
Assignee: Ian Alexander Joiner / @iajoiner

PRs and other links:

Note: This issue was originally created as ARROW-13154. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

Antoine Pitrou / @pitrou:
Issue resolved by pull request 10599
#10599

@asfimport asfimport added this to the 5.0.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant