Skip to content

Cast nested List to LargeList #8305

Closed

Description

@Weijun-H

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

Activity

  1. Weijun-H commented on Dec 1, 2023

    @Weijun-H
    MemberAuthor

    Will be fixed by arrow-rs 50.0

  2. alamb commented on Jan 2, 2024

    @alamb
    Contributor

    Will be fixed by arrow-rs 50.0

    This is tracked by apache/arrow-rs#5234

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions