Skip to content

comparison operations with a scalar null and decimal array panics #3487

@kmitchener

Description

@kmitchener

Describe the bug
A clear and concise description of what the bug is.

This test fails when given decimals instead of floats:'sql::expr::comparisons_with_null_lt' with error

 panicked at 'called `Result::unwrap()` on an `Err` value: "ArrowError(ExternalError(Internal(\"Cannot convert Decimal128(None,2,1) to i128\"))) ...

To Reproduce
Steps to reproduce the behavior:

You can reproduce with the following:

select a < null from (values (1.1::decimal)) as t(a);
ArrowError(ExternalError(Internal("Cannot convert Decimal128(None,2,1) to i128")))

but interestingly, the scalar / scalar version of that work fine:

select null < 1.1::decimal;
+---------------------------------+
| NULL < Decimal128(Some(11),2,1) |
+---------------------------------+
|                                 |
+---------------------------------+
1 row in set. Query took 0.002 seconds.

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions