Skip to content

Cast nested List to LargeList #8305

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Weijun-H opened this issue Nov 22, 2023 · 2 comments · Fixed by #8882
Closed

Cast nested List to LargeList #8305

Weijun-H opened this issue Nov 22, 2023 · 2 comments · Fixed by #8882
Labels
enhancement New feature or request

Comments

@Weijun-H
Copy link
Member

Weijun-H commented Nov 22, 2023

Is your feature request related to a problem or challenge?

datafusion cannot cast nested List to LargeList, like List(List(Int64)) to LargeList(LargeList(Int64)).

select arrow_cast(make_array(make_array(1, 2, 3), make_array(4, 5, 6)), 'LargeList(LargeList(Int64))');

Error during planning: Cannot automatically convert List(Field { name: "item", data_type: List(Field { name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }) to LargeList(Field { name: "item", data_type: LargeList(Field { name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} })

Describe the solution you'd like

https://github.com/apache/arrow-rs/blob/master/arrow-cast/src/cast.rs#L133-L135

        (List(list_from), LargeList(list_to)) => {
            list_from.data_type() == list_to.data_type()
        }

Describe alternatives you've considered

No response

Additional context

No response

@Weijun-H
Copy link
Member Author

Weijun-H commented Dec 1, 2023

Will be fixed by arrow-rs 50.0

@Weijun-H Weijun-H closed this as completed Dec 1, 2023
@Weijun-H Weijun-H reopened this Jan 2, 2024
@alamb
Copy link
Contributor

alamb commented Jan 2, 2024

Will be fixed by arrow-rs 50.0

This is tracked by apache/arrow-rs#5234

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants