Github user cestella commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/390#discussion_r91386552
  
    --- Diff: 
metron-platform/metron-common/src/test/java/org/apache/metron/common/stellar/StellarTest.java
 ---
    @@ -56,6 +56,37 @@
     public class StellarTest {
     
       @Test
    +  public void addingLongsShouldYieldLong() throws Exception {
    +    final long timestamp = 1452013350000L;
    +    String query = "TO_EPOCH_TIMESTAMP('2016-01-05 17:02:30', 'yyyy-MM-dd 
HH:mm:ss', 'UTC') + 2";
    +    Assert.assertEquals(timestamp + 2, run(query, new HashMap<>()));
    +  }
    +
    +  @Test
    +  public void addingIntegersShouldYieldAnInteger() throws Exception {
    +    String query = "1 + 2";
    +    Assert.assertEquals(3, run(query, new HashMap<>()));
    +  }
    +
    +  @Test
    +  public void addingDoublesShouldYieldADouble() throws Exception {
    +    String query = "1.0 + 2.0";
    +    Assert.assertEquals(3.0, run(query, new HashMap<>()));
    +  }
    +
    +  @Test
    +  public void 
addingDoubleAndIntegerWhereSubjectIsDoubleShouldYieldADouble() throws Exception 
{
    +    String query = "2.1 + 1";
    +    Assert.assertEquals(3.1, run(query, new HashMap<>()));
    +  }
    +
    +  @Test
    +  public void 
addingDoubleAndIntegerWhereSubjectIsIntegerShouldYieldADouble() throws 
Exception {
    +    String query = "1 + 2.1";
    +    Assert.assertEquals(3.1, run(query, new HashMap<>()));
    +  }
    --- End diff --
    
    Could we ensure that we have the following test cases and they return the 
proper types:
    * float + long returns a float
    * long + float returns a float
    * double + int returns a double
    * int + double returns a double
    * float + double returns  a double
    * double + float returns a double
    * long + double returns a double
    * double + long returns a double
    * long + int returns a long
    * int + long returns a long
    * int + int returns int
    * float + float returns float
    * double + double returns double
    * long + long returns long


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to