[
https://issues.apache.org/jira/browse/CALCITE-6654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18030216#comment-18030216
]
Jeremy Osterhoudt commented on CALCITE-6654:
--------------------------------------------
Unfortunately when I did a quick test for these and they either return 0 with
"wasNull()" set to true (meaning null) or 0 (Oracle). The issue stems from the
exception that is now thrown in
[SqlTypeFactoryImpl|[https://github.com/apache/calcite/blob/main/core/src/main/java/org/apache/calcite/sql/type/SqlTypeFactoryImpl.java#L105].]
If we catch this in the JdbcSchema class or check for "wasNull" and set
precision to PRECISION_NOT_SPECIFIED I'm assuming this will break further down
the line?
> Postgres NUMERIC type leads to "DECIMAL precision 0 must be between 1 and 19"
> -----------------------------------------------------------------------------
>
> Key: CALCITE-6654
> URL: https://issues.apache.org/jira/browse/CALCITE-6654
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.38.0
> Reporter: Ulrich Kramer
> Priority: Major
>
> Tying to query a VIEW in Postgres, which has one column of type NUMERIC,
> leads to the error
> {noformat}
> DECIMAL precision 0 must be between 1 and 19 {noformat}
> The corresponding precision metadata column in postgres contains a NULL value.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)