Created on 10-09-2014 01:59 AM - edited 09-16-2022 02:09 AM
Hello Friends,
It seems Impala does not support column names being a reserved word, is it correct? we have table with column name DATE if we select date or select distinct date query it says syntax error.Encountered: DATE
Expected: ALL, CASE, CAST, DISTINCT, FALSE, IF, INTERVAL, NOT, NULL, STRAIGHT_JOIN, TRUE, IDENTIFIER. Hive does not show up any problem. Is there any plan to fix this issue in Impala or it is built like that intentionally if yes why is it so? Is not it a problem if people created a table in Hive and then retrieving data from Impala. I am cautious that having column names same as reserved word is not good practice but this is not completly avoidable as well
Regards
Sree
Created 10-09-2014 01:35 PM
Created 10-10-2014 02:03 AM
That's wonderful. Thanks a lot Lenny.
Created 12-16-2018 08:57 AM
Hi,
it does not work and gives me following error
SELECT DISTINCT `date` FROM mydb.syscal;
Query: SELECT DISTINCT `date` FROM mydb.syscal
Query submitted at: 2018-12-16 11:54:55 (Coordinator: https://host:port)
ERROR: AnalysisException: Unsupported type 'DATE' in '`date`'.
Any other options?
Thanks & Regards,
Kamleshkumar Gujarathi
Bigdata Consultant
Created 12-17-2018 11:35 AM
Hi @Big
I checked on our latest build and it works for me - see below. Are you sure that you're not trying to query a table with a DATE type column?
[localhost:21000] default> create table foo2 (`date` int); Query: create table foo2 (`date` int) +-------------------------+ | summary | +-------------------------+ | Table has been created. | +-------------------------+ Fetched 1 row(s) in 1.19s [localhost:21000] default> select distinct `date` from foo2; Query: select distinct `date` from foo2 Fetched 0 row(s) in 0.12s