You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jacques Nadeau (JIRA)" <ji...@apache.org> on 2015/01/04 22:27:48 UTC

[jira] [Commented] (DRILL-915) Extracting year from a time literal should fail

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

Jacques Nadeau commented on DRILL-915:
--------------------------------------

Wrong result.

> Extracting year from a time literal should fail
> -----------------------------------------------
>
>                 Key: DRILL-915
>                 URL: https://issues.apache.org/jira/browse/DRILL-915
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>            Reporter: Rahul Challapalli
>            Assignee: Mehant Baid
>            Priority: Critical
>             Fix For: 1.0.0
>
>
> When we try to extract year, month or day from time, drill seems to be returning 1970, 1, 1 respectively (1970-01-01 is a valid date).  When we try to extract hour, minute, or second from any date literal, drill gives 0's. 
> In both cases we should fail the query with a proper message. Postgres fails the query in both the cases.
> select extract (day from time '02:22:12') from basic;
> select extract (hour from date '2000-04-21') from basic;



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