Skip to content

[Variant] Consider validating variants on creation (rather than read) #7684

Closed
@alamb

Description

@alamb

Yeah, I think in general this is hitting the tension you mentioned in the earlier PRs of early vs late validation.

The more I think about it the more I think we should move the validation to construction because:

  1. The only reason to create a Variant in the first place is to access its data, so I think we would end up validating it almost immediately on read
  2. Variants are constructed once but read many times so validating up front is probably faster
  3. We could offer an unchecked variant for construction if performance overhead is hight that skips the validation

Originally posted by @alamb in #7666 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    parquetChanges to the parquet crate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions