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++] Better support for building UnionArrays #22029

Closed
asfimport opened this issue Jun 13, 2019 · 1 comment
Closed

[C++] Better support for building UnionArrays #22029

asfimport opened this issue Jun 13, 2019 · 1 comment

Comments

@asfimport
Copy link
Collaborator

asfimport commented Jun 13, 2019

UnionBuilders (for both sparse and dense mode unions) are not currently supported by MakeBuilder or ArrayFromJSON. This increases friction when working with and testing against union arrays, and support should be added to both. For ArrayFromJSON each entry must be specified with a (type code, value) pair:

ArrayFromJSON(union_({field("lint", list(int32())), field("str", utf8())}), R"([
  [0, null],
  [1, "hello"],
  [0, [1, 2]],
  [1, "world"]
])");

DenseUnionBuilder currently requires the user to explicitly input offsets, but if it were modified to hold pointers to child builders (as ListBuilder, for example) then those offsets could be derived from the lengths of child builders (which is much more user friendly).

Reporter: Ben Kietzman / @bkietz
Assignee: Ben Kietzman / @bkietz

Related issues:

PRs and other links:

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

@asfimport
Copy link
Collaborator Author

Francois Saint-Jacques / @fsaintjacques:
Issue resolved by pull request 4781
#4781

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

2 participants