drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abhishek Girish (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-2751) Implicit cast in filters fails if some literals in an expression are enclosed in quotes.
Date Fri, 10 Apr 2015 18:08:12 GMT
Abhishek Girish created DRILL-2751:
--------------------------------------

             Summary: Implicit cast in filters fails if some literals in an expression are
enclosed in quotes. 
                 Key: DRILL-2751
                 URL: https://issues.apache.org/jira/browse/DRILL-2751
             Project: Apache Drill
          Issue Type: Bug
          Components: Query Planning & Optimization
            Reporter: Abhishek Girish
            Assignee: Jinfeng Ni


Drill currently expects all literals in an expression to be enclosed in quotes, and fails
otherwise. 

*Drill: Between operator*
{code:sql}
>  select d_date_sk, d_day_name from date_dim where d_same_day_lq between 2400000 and '2500000'
order by d_same_day_lq limit 3;
Query failed: SqlValidatorException: Cannot apply 'BETWEEN' to arguments of type '<ANY>
BETWEEN <INTEGER> AND <CHAR(7)>'. Supported form(s): '<COMPARABLE_TYPE>
BETWEEN <COMPARABLE_TYPE> AND <COMPARABLE_TYPE>'
Error: exception while executing query: Failure while executing query. (state=,code=0)
{code}

*Postgres: Between operator*
{code:sql}
# select d_date_sk, d_day_name from date_dim where d_same_day_lq between 2400000 and '2500000'
order by d_same_day_lq limit 3;
 d_date_sk | d_day_name
-----------+------------
   2415022 | Monday
   2415023 | Tuesday
   2415024 | Wednesday
(3 rows)
{code}

*Drill: IN operator*
{code:sql}
> select d_date_sk, d_day_name from date_dim where d_same_day_lq in ('2414930', 2414931)
limit 5;
Query failed: SqlValidatorException: Values in expression list must have compatible types
Error: exception while executing query: Failure while executing query. (state=,code=0)
{code}

*Postgres: IN operator*
{code:sql}
#  select d_date_sk, d_day_name from date_dim where d_same_day_lq in ('2414930', 2414931)
limit 5;
 d_date_sk | d_day_name
-----------+------------
   2415022 | Monday
   2415023 | Tuesday
(2 rows)
{code}





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

Mime
View raw message