Skip to content

select distinct on map types yields ArrowError NotYetImplemented #15428

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions