[ 
https://issues.apache.org/jira/browse/METRON-364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15728709#comment-15728709
 ] 

ASF GitHub Bot commented on METRON-364:
---------------------------------------

Github user cestella commented on the issue:

    https://github.com/apache/incubator-metron/pull/390
  
    You can return them from as results from stellar functions. Longs are
    output from time stamp functions for instance.
    On Wed, Dec 7, 2016 at 08:00 JJ Meyer <[email protected]> wrote:
    
    > The reason I neglected longs and floats is because I didn't see the
    > Stellar dsl having the ability to represent them. For example, the test
    > below fails with a parse exception:
    >
    > @Test public void testLongAddition() throws Exception { String query =
    > "2147483650 + 2"; Assert.assertEquals(2147483652L, run(query, new
    > HashMap<>())); }
    >
    > That being said it makes sense to still handle longs and floats, if
    > Stellar will at some point. If not that, at the very least if this
    > evaluator sees a long or float it should error out.
    >
    > Should I add support for longs/floats and then create a Jira for Stellar
    > to add them? Or am I mistaken and Stellar already has support?
    >
    > Thanks for the feedback.
    >
    > —
    > You are receiving this because you commented.
    > Reply to this email directly, view it on GitHub
    > 
<https://github.com/apache/incubator-metron/pull/390#issuecomment-265441115>,
    > or mute the thread
    > 
<https://github.com/notifications/unsubscribe-auth/AAg-x1540F94nUQNERbBY0OzYTPJKw9fks5rFq3bgaJpZM4LGKYJ>
    > .
    >



> Stellar - Adding Two Integers Does Not Equal an Integer
> -------------------------------------------------------
>
>                 Key: METRON-364
>                 URL: https://issues.apache.org/jira/browse/METRON-364
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Nick Allen
>              Labels: stellar
>
> A test showing the problem which would be part of 
> org.apache.metron.common.stellar.StellarTest  
> ```java
>       @Test
>       public void testAddIntegers()  throws Exception {
>         String query = "1 + 1";
>         Assert.assertEquals(2, run(query, new HashMap<>()));
>     //    java.lang.AssertionError:
>     //    Expected :2
>     //    Actual   :2.0
>       }
> ```



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to