nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jskora <...@git.apache.org>
Subject [GitHub] nifi pull request: NIFI-1661 add random() function to expression l...
Date Sun, 17 Apr 2016 20:19:56 GMT
Github user jskora commented on the pull request:

    https://github.com/apache/nifi/pull/322#issuecomment-211107429
  
    This looks pretty good, but in testing I came across 2 problems that need to be addressed
before it can be merged.
    
    1. The example in the [expression language guide](https://github.com/apache/nifi/pull/322/files#diff-daac74ec3b89e26d99806d7a90254fe3R1313)
should be `${random():mod(10):plus(1)}` since EL uses [plus](http://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#plus)
for addition.
    
    1. Though Math.Random appears to only return positive floats, `nextLong()` must be returning
positive and negative numbers.  Using the example expression I get numbers between -100 and
100 showing in the attributes.  The documentation should reflect that this could be positive
or negative and the example needs to be adjusted for that as well.
    
    In spite of the problems, nice job incorporating the EL Guide changes!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message