drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Barclay (Drill) (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (DRILL-3405) "INTERVAL '1111111111' YEAR(10)" yields garbage result
Date Fri, 26 Jun 2015 21:25:05 GMT

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

Daniel Barclay (Drill) edited comment on DRILL-3405 at 6/26/15 9:24 PM:
------------------------------------------------------------------------

There's also a problem with interval literals involving seconds and not days (HOUR(10) to
SECOND, MINUTE(10) to SECOND, and SECOND(10).

Oh--and it's not just with a precision of 10 and 10-digit numbers:

{noformat}
0: jdbc:drill:zk=local> SELECT  INTERVAL '987654321' YEAR(9) FROM INFORMATION_SCHEMA.CATALOGS;
+--------------+
|    EXPR$0    |
+--------------+
| P-86087503Y  |
+--------------+
1 row selected (0.209 seconds)
0: jdbc:drill:zk=local> 
{noformat}



was (Author: dsbos):
There's also a problem with interval literals involving seconds and not days (HOUR(10) to
SECOND, MINUTE(10) to SECOND, and SECOND(10).

> "INTERVAL '1111111111' YEAR(10)" yields garbage result
> ------------------------------------------------------
>
>                 Key: DRILL-3405
>                 URL: https://issues.apache.org/jira/browse/DRILL-3405
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Daniel Barclay (Drill)
>
> Some interval literals yield garbage results.
> It seems to be those with YEAR and/or MONTH fields, with Drill's maximum leading-digit
precision (10), and having a ten-digit value for that leading field (even when it's 10 digits
that fit in int).
> {noformat}
> 0: jdbc:drill:zk=local> SELECT  INTERVAL '1111111111' YEAR(10) FROM INFORMATION_SCHEMA.CATALOGS;
> +-------------+
> |   EXPR$0    |
> +-------------+
> | P37369287Y  |
> +-------------+
> 1 row selected (0.234 seconds)
> 0: jdbc:drill:zk=local> 
> 0: jdbc:drill:zk=local> SELECT  INTERVAL '1111111111' MONTH(10) FROM INFORMATION_SCHEMA.CATALOGS;
> +---------------+
> |    EXPR$0     |
> +---------------+
> | P92592592Y7M  |
> +---------------+
> 1 row selected (0.171 seconds)
> 0: jdbc:drill:zk=local> 
> 0: jdbc:drill:zk=local> SELECT  INTERVAL '1111111111-06' YEAR(10) TO MONTH FROM INFORMATION_SCHEMA.CATALOGS;
> +---------------+
> |    EXPR$0     |
> +---------------+
> | P37369287Y6M  |
> +---------------+
> 1 row selected (0.229 seconds)
> 0: jdbc:drill:zk=local> 
> {noformat}



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

Mime
View raw message