Skip to content

Avoid per-row dictionary casts for binary Parquet columns #26976

Open

Description

@Rich-T-kid

When Parquet dictionary promotion is enabled and binary_as_string maps a physical LargeBinary column to Dictionary(Int32, Utf8), the reader currently emits LargeBinary and DecoderProjection dictionary-encodes every row. In ClickBench Q23, pack_byte_to_dictionary and GenericByteDictionaryBuilder::append_array dominate the remaining dictionary regression.

The Parquet reader can preserve the on-disk dictionary by reading Dictionary(Int32, LargeBinary) and letting the projection cast only the distinct dictionary values to Utf8. The same approach applies to Utf8/LargeUtf8 offset-width mismatches. This keeps key decoding native while preserving the table schema and existing cast validation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions