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

feat: support cast between nested list and largelist #5121

Closed
wants to merge 2 commits into from

Conversation

Weijun-H
Copy link
Contributor

Which issue does this PR close?

Closes #5113

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Nov 23, 2023
@tustvold
Copy link
Contributor

Reviewing cast_list_container the issue and why this check is present, is that it currently doesn't recurse and cast the value data.

It took me a while to notice this, and I ended up getting quite nerd-sniped by this, so ended up just cleaning this logic up in #5124 PTAL

))),
)
.unwrap();
let actual = list_array.as_any().downcast_ref::<ListArray>().unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we please use AsArray in tests, i.e. .as_list::<i32>() it is much easier to read

&array,
&DataType::List(Arc::new(Field::new(
"",
DataType::List(Arc::new(Field::new("", DataType::Int32, false))),
Copy link
Contributor

Choose a reason for hiding this comment

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

AFAICT this test simply ignores the nested list here, and is returning a non-nested list. This is consistent with my reading of cast_list_container

@Weijun-H
Copy link
Contributor Author

Closed in favor of #5124

@Weijun-H Weijun-H closed this Nov 27, 2023
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.

Support Casting List To/From LargeList in Cast Kernel
2 participants