Skip to content

[Variant] Support VariantPathElement::Index for Variant Arrays for variant_get #9443

Closed

Description

@sdf-jkl

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
In #9049, @liamzwbao added variant_get support for VariantPathElement::Field for shredded arrays.

We still need to implement VariantPathElement::Index for variant_get.

Snippet from a comment by @scovich(#8082 (comment)):

In contrast, pathing through a shredded variant array requires slicing. For example,

SELECT variant_get(v, 'a[0].b[1].c[2]', INT)` AS c FROM t

Describe the solution you'd like
Add VariantPathElement::Index support to variant_get to enable path traversal through shredded arrays.

  1. Add a test that manually constructs a shredded variant array (follow the example in the arrow proposal)
  2. Add a test that tries to get that array as a variant and as a ListArray
  3. Implement the code

Additional reference
Variant Spec
Variant Shredding Spec
Representing Variant In Arrow Proposal

Activity

  1. added
    enhancement
    on Feb 19, 2026
  2. sdf-jkl commented on Feb 21, 2026

    @sdf-jkl
    MemberAuthor

    take

  3. added a commit that references this issue on May 25, 2026
    c4e154f
  4. added a commit that references this issue on Jun 2, 2026
    3640657
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions