You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Mihai Budiu (Jira)" <ji...@apache.org> on 2025/02/27 22:41:00 UTC

[jira] [Created] (CALCITE-6868) SqlTypeFactoryImpl.leastRestrictive produces incorrect results for DECIMAL and INTEGER

Mihai Budiu created CALCITE-6868:
------------------------------------

             Summary: SqlTypeFactoryImpl.leastRestrictive produces incorrect results for DECIMAL and INTEGER
                 Key: CALCITE-6868
                 URL: https://issues.apache.org/jira/browse/CALCITE-6868
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.38.0
            Reporter: Mihai Budiu


For a type system with maximum allowed precision of 28, 
the result of leastRestrictive between DECIMAL(28, 12) and INTEGER is DECIMAL(26, 10).
The correct result is DECIMAL(28, 12).
INTEGER has precision 10 and scale 0.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)