Skip to content

Conversation

@dhruv9vats
Copy link
Contributor

Provide the ability to select a subset of the fields of a StructArray array by casting it to the required fields, provided the fields exist in the StructArray.

@github-actions
Copy link

Copy link
Contributor Author

@dhruv9vats dhruv9vats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, the output StructArray fields need to be in the same order as in the input StructArray and also have the same name.

@dhruv9vats dhruv9vats requested a review from lidavidm March 28, 2022 18:57
Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks. Do you want to mark this as ready now?

@dhruv9vats dhruv9vats marked this pull request as ready for review March 30, 2022 14:07
@dhruv9vats
Copy link
Contributor Author

Would we have to address the other cases talked about in the JIRA in this PR itself, or will that involve follow-up PRs?

@lidavidm
Copy link
Member

lidavidm commented Apr 1, 2022

I think we can file a separate JIRA to handle reordering fields via a cast.

@lidavidm lidavidm changed the title ARROW-15643: [C++] Cast to select subset of fields of a StructArray ARROW-15643: [C++] Select subset of fields of a StructArray via cast Apr 1, 2022
@lidavidm lidavidm changed the title ARROW-15643: [C++] Select subset of fields of a StructArray via cast ARROW-15643: [C++] Allow selecting subset of fields of a StructArray via cast Apr 1, 2022
@lidavidm lidavidm closed this in ac3be08 Apr 1, 2022
@ursabot
Copy link

ursabot commented Apr 1, 2022

Benchmark runs are scheduled for baseline = bda7087 and contender = ac3be08. ac3be08 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️0.38% ⬆️0.0%] test-mac-arm
[Finished ⬇️1.07% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.34% ⬆️0.09%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] <https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/430| ac3be08e ec2-t3-xlarge-us-east-2>
[Finished] <https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/415| ac3be08e test-mac-arm>
[Finished] <https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/415| ac3be08e ursa-i9-9960x>
[Finished] <https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/425| ac3be08e ursa-thinkcentre-m75q>
[Finished] <https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/429| bda70875 ec2-t3-xlarge-us-east-2>
[Finished] <https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/414| bda70875 test-mac-arm>
[Finished] <https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/414| bda70875 ursa-i9-9960x>
[Finished] <https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/424| bda70875 ursa-thinkcentre-m75q>
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@jorisvandenbossche
Copy link
Member

Are the follow-up JIRAs already created?

@lidavidm
Copy link
Member

lidavidm commented Apr 4, 2022

Thanks for the reminder Joris, filed ARROW-16112.

@jorisvandenbossche
Copy link
Member

Thanks. Do we also still want to add a StructArray.select or alike as a more convenient way to do this for a single StructArray? (I can open an issue for that) Although in practice you will often deal with eg a ChunkedArray if it's coming from a Table, and then you don't have those type specific methods anyway.

@lidavidm
Copy link
Member

lidavidm commented Apr 4, 2022

We can probably still add it, though yeah, not sure how useful it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants