Skip to content

select distinct on map types yields ArrowError NotYetImplemented #15428

Closed

Description

@gz

Describe the bug

querying a table/parquet file with the following schema and query fails:

create table t (
    m MAP<VARCHAR, REAL> NOT NULL
);
let df = ctx.sql("SELECT distinct m FROM t LIMIT 10").await?;

fails with:

Error: ArrowError(NotYetImplemented("not yet implemented: Map(Field { name: \"entries\", data_type: Struct([Field { name: \"key\", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: \"value\", data_type: Float32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }]), nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }, false)"), None)

it runs into the unimplemented error that comes from arrow-rs: https://github.com/apache/arrow-rs/blob/15db256bcdd739ce3233d90b3242af15ae3945fa/arrow-row/src/lib.rs#L434

To Reproduce

parquet file with the given format that fails the query attached for convenience
results_20250325_003444.parquet.zip

Expected behavior

query returns correct results

Additional context

No response

Activity

  1. added
    bugSomething isn't working
    on Mar 25, 2025
  2. LSUDOKO commented on Mar 28, 2025

    @LSUDOKO

    take

  3. Jefffrey commented on Feb 3, 2026

    @Jefffrey
    Contributor
  4. Jefffrey commented on Jul 8, 2026

    @Jefffrey
    Contributor

    Rowconverter support is available on datafusion main now; to progress this issue we should add some test coverage in our sqllogictests with different distinct/aggregation queries (testing with group by too, etc.)

    e.g. in here https://github.com/apache/datafusion/blob/main/datafusion/sqllogictest/test_files/map.slt

  5. PG1204 commented on Jul 8, 2026

    @PG1204
    Contributor

    take

    Hi team, I'd like to pick this up. Following up on Jefffrey's note that RowConverter support is now on main, I'll add sqllogictest coverage in map.slt for:

    SELECT DISTINCT on Map columns
    GROUP BY with Map columns as grouping keys
    Aggregations (COUNT, etc.) over Map-typed inputs

    Planning to include edge cases like empty maps, maps with null values, and duplicate keys. Will confirm scope if there are specific scenarios you'd like prioritized.

  6. added a commit that references this issue on Jul 12, 2026
    761f7f6
  7. added a commit that references this issue on Aug 12, 2026
    1670bee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions