Skip to content

[Variant] Support Shredded Lists/Array in variant_get #8082

@alamb

Description

@alamb

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

We introduced the basic variant_get kernel in and now we need to expand its feature set

In particular, Shredded Arrays (VariantList) are described here:

Describe the solution you'd like
I would like variant_get to support shredded arrays, along with being able to extract elements from them.

So roughly that means

// get the variant as a ListArray
variant_get(array, Field::new(List...)))
// get the shredded variant as a non shredded variant (convert to Variant::List)
variant_get(array)

Describe alternatives you've considered

  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 context
Reference

Metadata

Metadata

Assignees

Labels

enhancementAny new improvement worthy of a entry in the changelog

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions