Skip to content

Add test coverage for grouping on dictionary encoded columns #8791

Open

Description

@alamb

Is your feature request related to a problem or challenge?

At InfluxData we use Dictionary(Int32, Utf8) heavily for certain columns of our queries.

This particular type of data is not well represented in the DataFusion codebase, which leads to issues such as #8738

In addition to not being well covered by functional tests, we also don't have particularly good coverage performance wise, especially for some of our important cases like grouping performance. This leads to dueling speculations on better/worse ways to run such queries, such as #7647 but now good way to evaluate them

Describe the solution you'd like

I would like to ensure we have adequate test coverage

  1. Functional tests so we don't hit regressions accidentally again
  2. Performance tests (e.g. so we could evaluate the changes contemplated by Materialize Dictionaries in Group Keys #7647

Describe alternatives you've considered

I added some functional sqllogictests in

However, those are not reading from Parquet files (as I could not figure out how to make a parquet file have the same schema I wanted)

Additional context

No response

Activity

  1. self-assigned this
    on Jan 8, 2024
  2. Rich-T-kid commented on Apr 2, 2026

    @Rich-T-kid
    Contributor

    take

  3. Rich-T-kid commented on Apr 7, 2026

    @Rich-T-kid
    Contributor

    @alamb I’m a bit confused by what you meant by:

    "However, those are not reading from Parquet files (as I could not figure out how to make a parquet file have the same schema I wanted)"

    In dictionary.slt I see that this statement exists:

    statement ok
    COPY (SELECT arrow_cast(column1, 'Dictionary(Int32, Utf8)') AS column1, column2 FROM test0) TO 'test_files/scratch/dictionary/part_dict_test' STORED AS PARQUET PARTITIONED BY (column1);
    

    which writes out the table as a partitioned Parquet dataset.

    I’ve also included my own test in a draft PR where I create a dictionary-encoded column, write it out to a Parquet file, then read it back in again and do a schema check (confirm it remains Dictionary(...)) as well as a basic filter.
    Is this what you meant by “reading from a Parquet file”? Or were you referring to a more specific Parquet scenario (e.g., a particular schema/layout/encoding that you weren’t able to reproduce) for the coverage you’re looking for?

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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions