drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Hsuan-Yi Chu (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DRILL-2313) Query fails when one of the operands is a DATE literal without an explicit cast
Date Fri, 04 Sep 2015 17:44:47 GMT

     [ https://issues.apache.org/jira/browse/DRILL-2313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sean Hsuan-Yi Chu resolved DRILL-2313.
--------------------------------------
    Resolution: Fixed

Resolved in commit#: 793884d671ec60c927e8d67e676e5f63f5875d75

> Query fails when one of the operands is a DATE literal without an explicit cast
> -------------------------------------------------------------------------------
>
>                 Key: DRILL-2313
>                 URL: https://issues.apache.org/jira/browse/DRILL-2313
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 0.8.0
>            Reporter: Abhishek Girish
>            Assignee: Sean Hsuan-Yi Chu
>             Fix For: 1.2.0
>
>
> For operations involving the date datatype, when one of the operands is a DATE literal
without a cast, query fails. 
> *The following query fails to validate:*
> {code:sql}
> SELECT
>          *
> FROM     
>          date_dim
>          
> WHERE    d_date BETWEEN '2002-3-01' AND cast('2002-3-01' AS DATE) 
> LIMIT 1;
> {code}
> Query failed: SqlValidatorException: Cannot apply 'BETWEEN' to arguments of type '<ANY>
BETWEEN <CHAR(9)> AND <DATE>'. Supported form(s): '<COMPARABLE_TYPE> BETWEEN
<COMPARABLE_TYPE> AND <COMPARABLE_TYPE>'
> *The following query executes fine:*
> {code:sql}
> SELECT
>          *
> FROM     
>          date_dim
>          
> WHERE    d_date BETWEEN '2002-3-01' AND 
>                   '2002-3-01'
> LIMIT 1;
> {code}
> Both the queries execute fine on postgres



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

Mime
View raw message