Skip to content

Cast error, cannot clone array with different data types (decimal) #3672

@scsmithr

Description

@scsmithr

Describe the bug

This test case:

query R
SELECT a + 2 FROM (SELECT CAST(a::INT AS DECIMAL(14,2)) FROM test) ORDER BY 1;
----

Fails with this error:

Error source: query failed: Cannot clone arrays with different data types
self: Decimal64(15,2)
other: Decimal64(16,2)

# TODO: Error source: query failed: Cannot clone arrays with different data types
# self: Decimal64(15,2)
# other: Decimal64(16,2)
# query R
# SELECT a + 2 FROM (SELECT CAST(a::INT AS DECIMAL(14,2)) FROM test) ORDER BY 1;
# ----

To Reproduce

See test case

Expected behavior

No error, and produce correct results

     3.00
     4.00
     5.00
     6.00

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions