You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Matt Burgess (Jira)" <ji...@apache.org> on 2021/03/25 22:51:00 UTC

[jira] [Updated] (NIFI-8368) Avro decimal logical type fails if scale > precision

     [ https://issues.apache.org/jira/browse/NIFI-8368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Burgess updated NIFI-8368:
-------------------------------
    Status: Patch Available  (was: In Progress)

> Avro decimal logical type fails if scale > precision
> ----------------------------------------------------
>
>                 Key: NIFI-8368
>                 URL: https://issues.apache.org/jira/browse/NIFI-8368
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Matt Burgess
>            Assignee: Matt Burgess
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Normally the precision of a decimal number its its total number of significant digits, and scale is the number of decimal digits, meaning that precision is almost always a greater value than scale. 
> Oracle is an example of an RDBMS where a decimal's scale value can be greater than its precision. From the Oracle documentation: "Scale can be greater than precision, most commonly when e notation is used. When scale is greater than precision, the precision specifies the maximum number of significant digits to the right of the decimal point. For example, a column defined as NUMBER(4,5) requires a zero for the first digit after the decimal point and rounds all values past the fifth digit after the decimal point."
> Avro assumes decimals with scale larger than precision are invalid, causing errors in ExecuteSQL(Record) processors for example. If scale is larger than precision, we can assume that the scale value should be used as the precision.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)