drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chun Chang (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-618) cast varchar to time gives all zeros
Date Thu, 01 May 2014 18:47:18 GMT
Chun Chang created DRILL-618:
--------------------------------

             Summary: cast varchar to time gives all zeros
                 Key: DRILL-618
                 URL: https://issues.apache.org/jira/browse/DRILL-618
             Project: Apache Drill
          Issue Type: Bug
            Reporter: Chun Chang


postgres:

foodmart=# select c_row, cast(cast(c_time as varchar(20)) as time) from data;
 c_row |   c_time
-------+-------------
     1 | 00:00:00
     2 | 01:00:00
     3 | 02:03:00
     4 | 11:59:00
     5 | 12:00:00
     6 | 12:01:00
     7 | 23:59:00
     8 | 23:59:59.99
     9 | 15:36:39
    10 | 15:36:39
    11 | 00:01:00
    12 | 01:10:00
    13 | 02:33:00
    14 | 23:59:00
    15 | 12:03:00
    16 | 12:31:00
    17 | 19:59:00
    18 | 11:59:59.99
    19 | 15:37:39
    20 | 15:36:39
    21 | 11:59:59.99
    22 | 15:37:39
    23 | 15:36:39
(23 rows)

drill:

0: jdbc:drill:schema=dfs> select c_row, cast(cast(c_time as varchar(20)) as time) from
data;
+------------+------------+
|   c_row    |   EXPR$1   |
+------------+------------+
| 1          | 00:00:00   |
| 2          | 00:00:00   |
| 3          | 00:00:00   |
| 4          | 00:00:00   |
| 5          | 00:00:00   |
| 6          | 00:00:00   |
| 7          | 00:00:00   |
| 8          | 00:00:00   |
| 9          | 00:00:00   |
| 10         | 00:00:00   |
| 11         | 00:00:00   |
| 12         | 00:00:00   |
| 13         | 00:00:00   |
| 14         | 00:00:00   |
| 15         | 00:00:00   |
| 16         | 00:00:00   |
| 17         | 00:00:00   |
| 18         | 00:00:00   |
| 19         | 00:00:00   |
| 20         | 00:00:00   |
| 21         | 00:00:00   |
| 22         | 00:00:00   |
| 23         | 00:00:00   |
+------------+------------+
23 rows selected (0.162 seconds)



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

Mime
View raw message