Chun Chang created DRILL-1028:
---------------------------------

             Summary: take sqrt() of negative decimal28 number 
                 Key: DRILL-1028
                 URL: https://issues.apache.org/jira/browse/DRILL-1028
             Project: Apache Drill
          Issue Type: Bug
          Components: Functions - Drill
            Reporter: Chun Chang
            Assignee: Mehant Baid


#Wed Jun 18 10:27:23 PDT 2014
git.commit.id.abbrev=894037a

Drill takes sqrt of negative decimal28 number:

0: jdbc:drill:schema=dfs> select c_row, cast(c_decimal28 as decimal(28,9)), 
sqrt(cast(c_decimal28 as decimal(28,9))) from data where c_row < 12 and 
cast(c_decimal28 as decimal(28,9)) > 0;
+------------+------------+------------+
|   c_row    |   EXPR$1   |   EXPR$2   |
+------------+------------+------------+
| 2          | 1.000000000 | 1.0        |
| 3          | 123456789.000000000 | 11111.111060555555 |
| 4          | 999999999.000000000 | 31622.776585872405 |
| 5          | -999999999.000000000 | 31622.776585872405 |
| 6          | 1.0E-8     | 1.0E-4     |
| 7          | -1.0E-8    | 1.0E-4     |
| 8          | 12345.678900000 | 111.11111060555555 |
| 9          | 123456789.123456789 | 11111.11106611111 |
| 10         | 999999999999999999.000000000 | 1.0E9      |
| 11         | -999999999999999999.000000000 | 1.0E9      |
+------------+------------+------------+
10 rows selected (0.283 seconds)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to