You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Cliff Buchanan (JIRA)" <ji...@apache.org> on 2014/06/11 23:19:02 UTC

[jira] [Comment Edited] (DRILL-585) timestamp and time data not showing up correctly in sqlline

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

Cliff Buchanan edited comment on DRILL-585 at 6/11/14 9:18 PM:
---------------------------------------------------------------

Patched to the JDBC interface to make getObject and getString more compatible with the [JDBC spec|http://download.oracle.com/otn-pub/jcp/jdbc-4_1-mrel-spec/jdbc4.1-fr-spec.pdf] (see appendix B), and [JDBC javadoc|http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html#getObject%28int%29].

https://reviews.apache.org/r/22475/


was (Author: cbuchanan):
Patched to the JDBC interface to make getObject and getString more compatible with the [JDBC spec|http://download.oracle.com/otn-pub/jcp/jdbc-4_1-mrel-spec/jdbc4.1-fr-spec.pdf] (see appendix B), and [JDBC javadoc|http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html#getObject%28int%29].

> timestamp and time data not showing up correctly in sqlline
> -----------------------------------------------------------
>
>                 Key: DRILL-585
>                 URL: https://issues.apache.org/jira/browse/DRILL-585
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - CLI
>            Reporter: Parth Chandra
>            Assignee: Cliff Buchanan
>             Fix For: 1.0.0-BETA1
>
>         Attachments: DRILL-585.patch
>
>
> Executing the following query -
> select first, last, age, sex, salary, registered, cast(join_date as timestamp) TIMEST, cast(join_date as date) DT, cast(join_time as TIME) TM   from dfs.`testTypes.json`
> returned the following results in sqlline- 
> +------------+------------+------------+------------+------------+------------+------------+------------+------------+
> |   first    |    last    |    age     |    sex     |   salary   | registered |   TIMEST   |     DT     |     TM     |
> +------------+------------+------------+------------+------------+------------+------------+------------+------------+
> | Jimmy      | James      | 29         | M          | 6300.1     | false      | 2011-11-30 | 2011-11-30 | 00:00:00   |
> | anderson   | carr       | null       | M          | 6300.1     | false      | null       | null       | null       |
> | John       | James      | 29         | M          | 6300.1     | true       | 2011-11-30 | 2011-11-30 | 00:00:00   |
> +------------+------------+------------+------------+------------+------------+------------+------------+------------+
> The timestamp column does not have time, and the time column has incorrect values.
> Data file contains the following data -
> {
>  "first": "Jimmy",
>  "last": "James",
>  "age": 29,
>  "sex": "M",
>  "salary": 6300.10,
>  "registered": false,
>  "join_date": "2011-11-30",
>  "join_time": "9:11:10.000"
> }
> {
>  "first": "anderson",
>  "last": "carr",
>  "sex": "M",
>  "salary": 6300.10,
>  "registered": false
> }
> {
>  "first": "John",
>  "last": "James",
>  "age": 29,
>  "sex": "M",
>  "salary": 6300.10,
>  "registered": true,
>  "join_date": "2011-11-30",
>  "join_time": "8:59:32.000"
> }



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