[
https://issues.apache.org/jira/browse/CALCITE-6868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mihai Budiu closed CALCITE-6868.
--------------------------------
Resolution: Invalid
It looks like this issue comes from our type system, which also specifies a
max_scale of 10.
Under these constraints, this is the correct solution.
I apologize for the noise produced.
> 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
> Assignee: Mihai Budiu
> Priority: Minor
>
> 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)