Skip to content

[Variant] Support array access when parsing VariantPath #8946

@alamb

Description

@alamb

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

You can create a VariantPath from a string like this:

let path = VariantPath::from("city.store");

However, that format does not currently support selecting array elements

So for example, there is no way to parse the equivalent of this (select the title from the 4th book): city.store.books[3].title

Describe the solution you'd like
I would like to be able to do something like

VariantPath::from("city.store.books[3].title");

And get the equivalent of

VariantPath::from("city")
  .join("store")
  .join("books")
  .join(3)
  .join("title")

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

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