Skip to content

Compute list/map cardinality from offsets #25078

Description

@neilconway

Is your feature request related to a problem or challenge?

We can compute cardinality by looking at the offsets in the GenericListArray. The current implementation creates a new array slice for every row and then fetches the length of the slice, which involves a lot of unnecessary per-row overhead.

For lists whose elements are scalar types, this is straightforward. For lists whose elements are themselves lists, this is possible but would be more complex (#25085)

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. neilconway commented on Sep 8, 2026

    @neilconway
    ContributorAuthor

    take

  2. changed the title [-]Compute list/map cardinality from offsets when possible[/-] [+]Compute list/map cardinality from offsets[/+] on Sep 8, 2026
  3. changed the title [-]Compute list/map cardinality from offsets[/-] [+]Compute list/map `cardinality` from offsets[/+] on Sep 8, 2026
  4. added a commit that references this issue on Sep 11, 2026
    e53078a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions