[
https://issues.apache.org/jira/browse/NIFI-8759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17379014#comment-17379014
]
Denes Arvay commented on NIFI-8759:
-----------------------------------
[~mattyb149], I have tested several numeric types using Oracle.
FLOAT's precision is 126, scale is -127, this won't be affected by the
suggested change due to scale being negative.
{{SELECT 1.23 FROM DUAL}}'s is mapped as {{NUMBER(0, -127)}}, ROWNUM is mapped
as {{NUMBER(0, 0)}}. These won't be affected either as a different {{if}}
branch handles the {{precision == 0}} cases.
I'll open a PR soon.
There's one case though where the logic could be improved: NUMBER with negative
scale should be treated with zero scale instead of the default.
This isn't in the scope of this ticket, I just wanted to mention.
> ExecuteSQL and ExecuteSQLRecord unnecessarily fall back to default decimal
> scale
> --------------------------------------------------------------------------------
>
> Key: NIFI-8759
> URL: https://issues.apache.org/jira/browse/NIFI-8759
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Denes Arvay
> Assignee: Denes Arvay
> Priority: Major
>
> If the database returns 0 as scale of a decimal field ExecuteSQL and
> ExecuteSQLRecord processors fall back to the default scale even though 0
> should be a valid scale.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)