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

Ramana Inukonda Nagaraj resolved DRILL-523.
-------------------------------------------

    Resolution: Invalid

Escape reserved words like state, count when using as column names.

So for the above query-

select * from hive.orce_create_people where id <10 and `state`=`Ca`;

> Drill does not know about columns used to partition hive tables
> ---------------------------------------------------------------
>
>                 Key: DRILL-523
>                 URL: https://issues.apache.org/jira/browse/DRILL-523
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Ramana Inukonda Nagaraj
>
> CREATE TABLE orc_create_people (
>   id int,
>   first_name string,
>   last_name string,
>   address string)
> PARTITIONED BY (state string)
> SELECT * FROM hive.orc_create_people where id < 10 and state = 'Ca';
> message: "Failure while parsing sql. < ValidationException:[ 
> org.eigenbase.util.EigenbaseContextException: From line 1, column 56 to line 
> 1, column 60 ] < EigenbaseContextException:[ From line 1, column 56 to line 
> 1, column 60 ] < SqlValidatorException:[ Column \'STATE\' not found in any 
> table ]"
> Works fine if you remove the state column from the query.
> SELECT * FROM hive.orc_create_people where id < 10;



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

Reply via email to