You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by JPercivall <gi...@git.apache.org> on 2016/09/13 21:52:47 UTC

[GitHub] nifi pull request #1018: NIFI-1662 adding Expression Language decimal suppor...

GitHub user JPercivall opened a pull request:

    https://github.com/apache/nifi/pull/1018

    NIFI-1662 adding Expression Language decimal support

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/JPercivall/nifi NIFI-1662-2

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/1018.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1018
    
----
commit 6b6370ae1386279438bca05a2f65f7bd9d50cda9
Author: jpercivall <jo...@yahoo.com>
Date:   2016-09-13T21:40:58Z

    NIFI-1662 adding Expression Language decimal support

----


---
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.
---

[GitHub] nifi issue #1018: NIFI-1662 adding Expression Language decimal support

Posted by JPercivall <gi...@git.apache.org>.
Github user JPercivall commented on the issue:

    https://github.com/apache/nifi/pull/1018
  
    @mattyb149 just pushed out a new commit along with yours. I added proper support for literal decimals in the UI as well.


---
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.
---

[GitHub] nifi issue #1018: NIFI-1662 adding Expression Language decimal support

Posted by JPercivall <gi...@git.apache.org>.
Github user JPercivall commented on the issue:

    https://github.com/apache/nifi/pull/1018
  
    @mattyb149 the problem was that the parsing for the various representations of doubles in Java is crazy, Check out the pattern used in this documentation[1]. I guess we could offer a sub-set of the representations as literals?
    
    [1] https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html#valueOf-java.lang.String-


---
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.
---

[GitHub] nifi issue #1018: NIFI-1662 adding Expression Language decimal support

Posted by trixpan <gi...@git.apache.org>.
Github user trixpan commented on the issue:

    https://github.com/apache/nifi/pull/1018
  
    > (who uses Hex literals for floating point?!),
    
    I do! Like... All the time!
    
    But I also joke sometimes...
    
    :smiley:


---
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.
---

[GitHub] nifi issue #1018: NIFI-1662 adding Expression Language decimal support

Posted by JPercivall <gi...@git.apache.org>.
Github user JPercivall commented on the issue:

    https://github.com/apache/nifi/pull/1018
  
    @mattyb149 this is awesome! I was having bit of trouble trying with the grammar due to not knowing much about ANTLR. I'm gonna add your commit to my branch, test it a bit and then add it to the PR.


---
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.
---

[GitHub] nifi issue #1018: NIFI-1662 adding Expression Language decimal support

Posted by mattyb149 <gi...@git.apache.org>.
Github user mattyb149 commented on the issue:

    https://github.com/apache/nifi/pull/1018
  
    Why are decimal literals expected to be in String format? Seems like the Lexer should be able to determine a decimal literal from a whole number literal?


---
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.
---

[GitHub] nifi pull request #1018: NIFI-1662 adding Expression Language decimal suppor...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi/pull/1018


---
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.
---

[GitHub] nifi issue #1018: NIFI-1662 adding Expression Language decimal support

Posted by mattyb149 <gi...@git.apache.org>.
Github user mattyb149 commented on the issue:

    https://github.com/apache/nifi/pull/1018
  
    I'm a big ANTLR fan :) so I tried adding decimal literals to the grammar, feel free to take a look and use whatever you like: https://github.com/mattyb149/nifi/commit/9ed3fb4f17b0ec64fbe9d861ff255750c3ec7e5a


---
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.
---

[GitHub] nifi issue #1018: NIFI-1662 adding Expression Language decimal support

Posted by mattyb149 <gi...@git.apache.org>.
Github user mattyb149 commented on the issue:

    https://github.com/apache/nifi/pull/1018
  
    I like the idea of a subset, we can probably cover 90% of the cases people have for floating-point literals (who uses Hex literals for floating point?!), but it might warrant a discussion with the community.


---
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.
---

[GitHub] nifi issue #1018: NIFI-1662 adding Expression Language decimal support

Posted by JPercivall <gi...@git.apache.org>.
Github user JPercivall commented on the issue:

    https://github.com/apache/nifi/pull/1018
  
    @mattyb149, I agree with adding it to the lexer as a subset. I thought through it a bit more and is someone passes "toLiteral('1.1')" they should expect they would get a string with the value "1.1". 
    
    I'll do some research on the best way to parse double/floating points via Antlr and post a new commit.
    
    Thanks!


---
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.
---