[
https://issues.apache.org/jira/browse/NIFI-1662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15216194#comment-15216194
]
ASF GitHub Bot commented on NIFI-1662:
--------------------------------------
Github user JPercivall commented on the pull request:
https://github.com/apache/nifi/pull/310#issuecomment-202964957
The reason I broke out the Decimal functions for math functions is to not
force users to use a specific return value.
For the logical math functions (greater than, etc.) I couldn't figure out
how to parse the incoming values if they were passed in as strings. Since
almost all attributes will be passed in as strings I couldn't make an
assumption on whether to interpret them as longs or doubles.
> Improve Expression Language to Enable Working with Decimals
> -----------------------------------------------------------
>
> Key: NIFI-1662
> URL: https://issues.apache.org/jira/browse/NIFI-1662
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Joseph Percivall
> Assignee: Joseph Percivall
>
> Currently the math operations in Expression Language use Longs to evaluate
> numbers. This leads to any decimal places getting truncated when performing
> operations like divide.
> EL should be improved to enable the user to evaluate math expressions using
> doubles.
> Another desired portion of this would be to open up the static Math class [1]
> methods (using reflection) to further enable working with Decimals.
> [1] https://docs.oracle.com/javase/7/docs/api/java/lang/Math.html
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)