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

Ramana Inukonda Nagaraj commented on DRILL-637:
-----------------------------------------------

For clarity: First column is Drill second column is postgres through JDBC.

0.0        0.0                                          
1.0        1.0
1.23456789E8 1.23456789E8
9.99999999E8 9.99999999E8
-9.99999999E8 -9.99999999E8
1.0E-8     1.0E-8
-1.0E-8    -1.0E-8
12345.6789 12345.6789
1.2345678912345679E8 1.2345678912345679E8
1.0E18     1.0E18
-1.0E18    -1.0E18
1.0E-17    1.0E-17
-1.0E-17   -1.0E-17
1.2345678901234123E13 1.2345678901234123E13
1.0E28     1.0E28
-1.0E28    -1.0E28
1.0E-27    1.0E-27
-1.0E-27   -1.0E-27
1.23456789012345677E18 1.23456789012345677E18
1.0E38     1.0E38
-1.0E38    -1.0E38
1.0E-37    1.0E-37
-1.0E-37   -1.0E-37

> numerical data format mismatch
> ------------------------------
>
>                 Key: DRILL-637
>                 URL: https://issues.apache.org/jira/browse/DRILL-637
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Chun Chang
>            Priority: Minor
>
> There are some mismatch on the returns for numerical values between postgres 
> and drill. Here is an example:
> postgres:
> foodmart=# select cast(c_decimal38 as double precision) from data;
>      c_decimal38
> ----------------------
>                     0
>                     1
>             123456789
>             999999999
>            -999999999
>                 1e-08
>                -1e-08
>            12345.6789
>      123456789.123457
>                 1e+18
>                -1e+18
>                 1e-17
>                -1e-17
>      12345678901234.1
>                 1e+28
>                -1e+28
>                 1e-27
>                -1e-27
>  1.23456789012346e+18
>                 1e+38
>                -1e+38
>                 1e-37
>                -1e-37
> (23 rows)
> drill:
> 0: jdbc:drill:schema=dfs> select cast(c_decimal38 as double precision) from 
> data;
> +------------+
> |   EXPR$0   |
> +------------+
> | 0.0        |
> | 1.0        |
> | 1.23456789E8 |
> | 9.99999999E8 |
> | -9.99999999E8 |
> | 1.0E-8     |
> | -1.0E-8    |
> | 12345.6789 |
> | 1.2345678912345679E8 |
> | 1.0E18     |
> | -1.0E18    |
> | 1.0E-17    |
> | -1.0E-17   |
> | 1.2345678901234123E13 |
> | 1.0E28     |
> | -1.0E28    |
> | 1.0E-27    |
> | -1.0E-27   |
> | 1.23456789012345677E18 |
> | 1.0E38     |
> | -1.0E38    |
> | 1.0E-37    |
> | -1.0E-37   |
> +------------+
> I don't think this is a bug but my boss asked me to file a tracking bug so we 
> can discuss this.



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

Reply via email to