Skip to content

[Variant] Support Shredded Objects in variant_get #8083

@alamb

Description

@alamb

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

Note this is likely one of the most complex parts of implementing Shredded Variants , so it is not a good first task

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

In particular, Shredded Objects

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

So roughly that means

// get the named field of variant object as a Variant
variant_get(array, "$.field_name")
// get the named field of variant object as a typed field 
variant_get(array, "$.field_name", DataType::Int)

This should work for:

  1. Variants where the field_name is in a typed_value
  2. Variants where the field_name is not in the typed value

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 calls variant_get appropriately
  3. Implement the code

I suggest getting this working for non-nested obejcts first, and then working on nesting / pathing as a second pR

Additional context
Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    parquetChanges to the parquet crateparquet-variantparquet-variant* crates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions