You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Daniel Barclay (Drill) (JIRA)" <ji...@apache.org> on 2015/03/17 23:20:38 UTC

[jira] [Commented] (DRILL-2486) Return format differences between drill & odbc from interval date queries

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

Daniel Barclay (Drill) commented on DRILL-2486:
-----------------------------------------------

> The result from ODBC seems easier to read.

Except that the units aren't explicit in the ODBC output.

Note the SQLLine output above follows the standard format for durations from ISO 8601 and 
[XML Schema Part 2: Datatypes &sect; 3.2.6 duration|http://www.w3.org/TR/xmlschema-2/#duration].

> Return format differences between drill & odbc from interval date queries  
> ---------------------------------------------------------------------------
>
>                 Key: DRILL-2486
>                 URL: https://issues.apache.org/jira/browse/DRILL-2486
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Data Types
>    Affects Versions: 0.8.0
>            Reporter: Krystal
>            Assignee: Daniel Barclay (Drill)
>            Priority: Minor
>
> git.commit.id=ae2053d2a078a40033a140f2dfaeef802a5e8254
> The format of results from interval date queries is different between drill and odbc.  Below are some examples.
> From drill:
> SELECT interval '10' day from basic limit 1;
> +------------+
> |   EXPR$0   |
> +------------+
> | P10D       |
> +------------+
> SELECT interval '12-11' year to month from basic limit 1;
> +------------+
> |   EXPR$0   |
> +------------+
> | P12Y11M    |
> SELECT interval '1' year from basic limit 1;
> +------------+
> |   EXPR$0   |
> +------------+
> | P1Y        |
> +------------+
> SELECT interval '9' month from basic limit 1;
> +------------+
> |   EXPR$0   |
> +------------+
> | P9M        |
> +------------+
>  From ODBC:
> SQL> SELECT interval '10' day from basic limit 1
> +---------------------------+
> | EXPR$0                    |
> +---------------------------+
> | 10 00:00:00.000000        |
> +---------------------------+
> SQL> SELECT interval '12-11' year to month from basic limit 1
> +--------------+
> | EXPR$0       |
> +--------------+
> | 12-11        |
> +--------------+
> SQL> SELECT interval '1' year from basic limit 1
> +--------------+
> | EXPR$0       |
> +--------------+
> | 1-00         |
> +--------------+
> SQL> SELECT interval '9' month from basic limit 1
> +--------------+
> | EXPR$0       |
> +--------------+
> | 0-09         |
> +--------------+
> We should have consistent output from the 2 sources.  The result from ODBC seems easier to read.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)