[ 
https://issues.apache.org/jira/browse/CALCITE-6322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17839000#comment-17839000
 ] 

Stamatis Zampetakis commented on CALCITE-6322:
----------------------------------------------

Hey [~mbudiu], this work seems to have some overlap with CALCITE-5860 and same 
goes for the respective PRs (PR#3733 and PR#3326) which touch very similar 
pieces of code & tests. Can they be merged independently? Does one subsume the 
other? If you can highlight similarities and differences that would help in 
reviewing the PR here.

Some time ago while reviewing CALCITE-5860, I left some comments that may also 
apply to this jira as well. For instance, various tests in SqlOperatorTest that 
involve casts and decimals are skipped due to the [DECIMAL 
fla|https://github.com/apache/calcite/blob/0551b8903391c1706422a2c1b8b648a6941f39a2/testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java#L354];
 looking at the description of this JIRA ticket I would expect that this tests 
would be enabled after fixing the casts to decimal but it doesn't seem to be 
the case.

> 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
>              Labels: pull-request-available
>             Fix For: 1.37.0
>
>
> 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)

Reply via email to