Skip to content

Optimizer rule error for ExtractLeafExpressions #20430

@adriangb

Description

@adriangb

Describe the bug

Run:

copy (
    select {f1: 1, f2: 2} as s
) to 'struct.parquet';

create external table struct
stored as parquet
location 'struct.parquet';

SELECT
    get_field(s, 'f1') AS __datafusion_extracted_2
FROM struct
WHERE COALESCE(get_field(s, 'f1'), get_field(s, 'f2')) = 42;
Optimizer rule 'push_down_leaf_projections' failed
caused by
Schema error: Schema contains duplicate unqualified field name __datafusion_extracted_2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions