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

GH-42235: [C++] list_parent_indices: Add support for list-view types #42236

Merged
merged 6 commits into from
Jun 26, 2024

Conversation

felipecrv
Copy link
Contributor

@felipecrv felipecrv commented Jun 20, 2024

Rationale for this change

Completing the support of list-views.

What changes are included in this PR?

Implementation of the list_parent_indices function for ListViewType and LargeListViewType.

Are these changes tested?

Yes, by new unit tests.

Are there any user-facing changes?

More complete support of list-views.

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

Thanks @felipecrv !

auto input =
ArrayFromJSON(list_view(int16()), "[[0, null, 1], [0, 0], [2, 3], [], [4, 5]]");
auto tweaked = TweakValidityBit(input, 1, false);
auto expected = ArrayFromJSON(int64(), "[0, 0, 0, null, null, 2, 2, 4, 4]");
Copy link
Member

Choose a reason for hiding this comment

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

Hmm... the fact that this gives a different result than for regular lists should perhaps be called out in the official documentation for this function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Tell me if it's clear enough.

docs/source/cpp/compute.rst Show resolved Hide resolved
cpp/src/arrow/compute/kernels/vector_nested.cc Outdated Show resolved Hide resolved
cpp/src/arrow/compute/kernels/vector_nested.cc Outdated Show resolved Hide resolved
@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Jun 24, 2024
@felipecrv felipecrv requested a review from pitrou June 24, 2024 22:14
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jun 24, 2024
Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

LGTM, but the Windows build failures need fixing (just a missing cast).

@pitrou pitrou merged commit 508bdaa into apache:main Jun 26, 2024
35 of 39 checks passed
@pitrou pitrou removed the awaiting change review Awaiting change review label Jun 26, 2024
@felipecrv felipecrv deleted the list_parent_indices branch June 26, 2024 14:52
Copy link

After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit 508bdaa.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 7 possible false positives for unstable benchmarks that are known to sometimes produce them.

zanmato1984 pushed a commit to zanmato1984/arrow that referenced this pull request Jul 9, 2024
…types (apache#42236)

### Rationale for this change

Completing the support of list-views.

### What changes are included in this PR?

Implementation of the `list_parent_indices` function for `ListViewType` and `LargeListViewType`.

### Are these changes tested?

Yes, by new unit tests.

### Are there any user-facing changes?

More complete support of list-views.
* GitHub Issue: apache#42235

Lead-authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
Co-authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
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.

2 participants