Skip to content

Conversation

@vegarsti
Copy link
Contributor

@vegarsti vegarsti commented Oct 29, 2025

Which issue does this PR close?

Related to tracking issue #5375 for ListView.

Rationale for this change

We need cast support for ListView and LargeListView.

Are these changes tested?

Yes

@vegarsti vegarsti marked this pull request as ready for review October 29, 2025 11:58
@github-actions github-actions bot added the arrow Changes to the arrow crate label Oct 29, 2025
@vegarsti vegarsti marked this pull request as draft October 29, 2025 12:42
@vegarsti vegarsti force-pushed the cast-list-view branch 2 times, most recently from 3065079 to 36065f0 Compare October 29, 2025 18:31
@vegarsti vegarsti marked this pull request as ready for review October 29, 2025 19:45
@asubiotto
Copy link
Contributor

cc @connortsui20 in case you want to take a look at this casting code in datafusion, since you've done a bunch of related things in vortex.

OffsetSize: OffsetSizeTrait,
{
let list = array.as_list::<OffsetSize>();
let list_view: GenericListViewArray<OffsetSize> = list.clone().into();
Copy link
Contributor Author

@vegarsti vegarsti Oct 30, 2025

Choose a reason for hiding this comment

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

This uses a new From impl, because I saw that was the pattern for other types into ListViewArray, but we don't do that for ListView to List. Just pointing out the inconsistency, but think it's fine.

Comment on lines +160 to +165
(ListView(list_from), List(list_to)) => {
can_cast_types(list_from.data_type(), list_to.data_type())
}
(LargeListView(list_from), LargeList(list_to)) => {
can_cast_types(list_from.data_type(), list_to.data_type())
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I forgot to simplify this branch, will do

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

Labels

arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants