Skip to content

[Variant] Remove BorrowedShreddingState #9790

@sdf-jkl

Description

@sdf-jkl

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

With #9610 ShreddingState is now using an ArrayRef to store both typed and untyped value.

/// [Parquet Variant Shredding Spec]: https://github.com/apache/parquet-format/blob/master/VariantShredding.md#value-shredding
#[derive(Debug, Clone)]
pub struct ShreddingState {
value: Option<ArrayRef>,
typed_value: Option<ArrayRef>,
}

This makes the BorrowedShreddingState redundant:

/// Similar to [`ShreddingState`] except it holds borrowed references of the target arrays. Useful
/// for avoiding clone operations when the caller does not need a self-standing shredding state.
#[derive(Clone, Debug)]
pub struct BorrowedShreddingState<'a> {
value: Option<&'a ArrayRef>,
typed_value: Option<&'a ArrayRef>,
}

Describe the solution you'd like

  • Remove BorrowedShreddingState impl
  • Replace BorrowedShreddingState with ShreddingState where used

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAny new improvement worthy of a entry in the changelog

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions