Skip to content

Internal error: Failed to coerce types Decimal128(10, 2) and Boolean in BETWEEN expression #3646

@andygrove

Description

@andygrove

Describe the bug

Postgres:

select * from test where a between (select distinct a from test) and (select distinct b from test);
  a   |  b   
------+------
 1.00 | 2.00
(1 row)

DataFusion:

select * from test where a between (select distinct a from test) and (select distinct b from test);

Internal("Optimizer rule 'type_coercion' failed due to unexpected error: Internal error: Failed to coerce types Decimal128(10, 2) and Boolean in BETWEEN expression. This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker")

To Reproduce
As shown.

Expected behavior
Should work.

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingoptimizerOptimizer rules

    Type

    No type
    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