drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul-rogers <...@git.apache.org>
Subject [GitHub] drill pull request #863: DRILL-4970: Prevent changing the negative value of ...
Date Fri, 30 Jun 2017 02:37:16 GMT
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/863#discussion_r124953868
  
    --- Diff: exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestCastFunctions.java
---
    @@ -78,4 +81,71 @@ public void testToDateForTimeStamp() throws Exception {
             .build()
             .run();
       }
    +
    +  @Test // DRILL-4970
    +  public void testCastNegativeFloatToInt() throws Exception {
    +    try {
    +      test("create table dfs_test.tmp.table_with_float as\n" +
    --- End diff --
    
    A full test would handle all conditions:
    
    * 0
    * +/- 0.4
    * +/- 0.5
    * INTEGER.MAX_VALUE as double
    * INTEGER.MAX_VALUE + 0.4 as double
    * INTEGER.MAX_VALUE + 0.5 as double
    * INTEGER.MIN_VALUE as double
    * INTEGER.MIN_VALUE - 0.4 as double
    * INTEGER.MIN_VALUE - 0.5 as double
    * DOUBLE.MAX_VALUE
    * DOUBLE.MIN_VALUE
    



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