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

[jira] [Commented] (DRILL-818) date_add returns only date for date + or - time

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

Krystal commented on DRILL-818:
-------------------------------

In oracle, similar query returns only the date like drill:
SQL> select to_date('1999-04-26','YYYY-MM-DD') + INTERVAL '11:20' HOUR TO MINUTE from dual;

TO_DATE('
---------
26-APR-99

In postgres, similar query returns data with timestamp like sqlline:

postgres=# select to_date('1999-04-26','YYYY-MM-DD') + INTERVAL '11:20' HOUR TO MINUTE;
      ?column?       
---------------------
 1999-04-26 11:20:00


> date_add returns only date for date + or - time
> -----------------------------------------------
>
>                 Key: DRILL-818
>                 URL: https://issues.apache.org/jira/browse/DRILL-818
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>            Reporter: Krystal
>
> git.commit.id.abbrev=2fad21d
> select date_add(to_date('05 Dec 2013', 'dd MMM YYYY'), interval '1 10:20:30' DAY to second) from voter where voter_id=10
> jdbc returns 2013-12-06
> From sqlline for the same query, it returns expected result of 2013-12-06T10:20:30.000-08:00



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