[
https://issues.apache.org/jira/browse/NIFI-8368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17310745#comment-17310745
]
ASF subversion and git services commented on NIFI-8368:
-------------------------------------------------------
Commit a5dbf561143fccffc408bd379de1ec590f1d399d in nifi's branch
refs/heads/main from Matt Burgess
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=a5dbf56 ]
NIFI-8368: If decimal scale > precision, set precision = scale
This closes #4938
Signed-off-by: David Handermann <[email protected]>
> 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: 40m
> 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)