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

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

GitHub user jjmeyer0 opened a pull request:

    https://github.com/apache/incubator-metron/pull/390

    METRON-364: Preserve Type for Arithmetic Expressions in Stellar

    updated stellar arithmetic expressions to be evaluated in a manner that 
keeps type. For example, if two integers are added then an integer will be 
returned.

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

    $ git pull https://github.com/jjmeyer0/incubator-metron METRON-364

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

    https://github.com/apache/incubator-metron/pull/390.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 #390
    
----
commit b69dabe5a50e5c32b8e44f03db187894199fe5a4
Author: JJ <[email protected]>
Date:   2016-12-07T02:50:40Z

    METRON-364: updated stellar arithmetic expressions to be evaluated in a 
manner that keeps type. For example, if two integers are added then an integer 
will be returned.

commit dce230124ec62473e0102dc144a7ae911de13ca6
Author: JJ <[email protected]>
Date:   2016-12-07T03:28:42Z

    METRON-364: updated stellar arithmetic expressions to be evaluated in a 
manner that keeps type. For example, if two integers are added then an integer 
will be returned.

commit cdd69dc3a90f0e35a117248980588179c4e3ed5c
Author: JJ <[email protected]>
Date:   2016-12-07T03:34:35Z

    Uncommenting tests that should still run.

----


> 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