Skip to content

[Variant] variant_get(..., List<_>) non-Struct types support #9615

Closed

Description

@sdf-jkl

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

While working on #9599 @scovich and I noticed that variant_get(..., List<Int64>) returns a shredded List<Struct{value, typed_value:Int64}> instead of List<Int64>
#9599 (comment)

I believe the newly added test_variant_get_list_like_unsafe_cast_preserves_null_elements unit test confirms the wrong behavior:
Caller passes DataType::List(Arc::new(Field::new("item", DataType::Int64, true))) (= List)
But the test expects List<Struct{value, typed_value:Int64}> (= shredded variant array)

Describe the solution you'd like
Make VariantToListArrowRowBuilder build arrays depending on the requested output type, not just shredded struct.

Describe alternatives you've considered

Additional context

Activity

  1. added
    enhancement
    on Mar 24, 2026
  2. changed the title [-][Variant] `variant_get(..., List<_>)` non-Struct support[/-] [+][Variant] `variant_get(..., List<_>)` non-Struct types support[/+] on Mar 24, 2026
  3. liamzwbao commented on Mar 30, 2026

    @liamzwbao
    Contributor

    This makes sense. Thanks for catching this, @sdf-jkl! I will take a look

  4. added a commit that references this issue on Apr 6, 2026
    0936b38
  5. added
    parquet-variant
    on Apr 23, 2026
  6. alamb commented on Apr 23, 2026

    @alamb
    Contributor

    label_issue.py automatically added labels {'parquet-variant'} from #9599

  7. added a commit that references this issue on Jun 2, 2026
    713e13f
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

    enhancementparquet-variant

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions