Skip to content

[Variant] Implement VariantArray::value for shredded variants #8091

@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

The VariantArray::value method is supposed to return a Variant::Value at the relevant index. This currently works fine for Unshredded variants but for most shredded variants and will panic in debug buillds, and return a Variant::Null in release builds

@Samyak2 commented here: #8021 (comment)

That's unfortunate. Maybe a separate issue for that?

Describe the solution you'd like

I would like VariantArray::value to work for more value types

Specifically this code here:

https://github.com/apache/arrow-rs/blob/c561acba798d34f7e642eca44b298c2a3b63ff98/parquet-variant-compute/src/variant_array.rs#L341-L340

Describe alternatives you've considered

Ideally we would find a way to reuse the macros being developed for cast_to_variant kernel as suggested by @Samyak2 above.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAny new improvement worthy of a entry in the changelogparquet-variantparquet-variant* crates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions