You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Maksim Zhuravkov (Jira)" <ji...@apache.org> on 2024/03/12 16:10:00 UTC
[jira] [Updated] (CALCITE-6322) Casts to DECIMAL types are ignored
[ https://issues.apache.org/jira/browse/CALCITE-6322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maksim Zhuravkov updated CALCITE-6322:
--------------------------------------
Attachment: (was: image.png)
> Casts to DECIMAL types are ignored
> ----------------------------------
>
> Key: CALCITE-6322
> URL: https://issues.apache.org/jira/browse/CALCITE-6322
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.36.0
> Reporter: Mihai Budiu
> Priority: Major
>
> The following SqlOperatorTest fails:
> {code:java}
> f.checkScalar("CAST(1.123 AS DECIMAL(4, 0))", "1.0", "DECIMAL(4, 0) NOT NULL");
> {code}
> The result computed by Calcite is 1.123, ignoring the scale of the DECIMAL result.
> Spark, Postgres, MySQL all return 1.0.
> I have marked this as a major bug.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)