I am trying to execute offset query in hive where I am trying to exclude particular records, but always getting the error below:
Query:
select * from sample order by id limit 1 OFFSET 1;
Error:
FAILED: ParseException line 1:41 missing EOF at 'OFFSET' near '1'
I tried dropping table and creating it again as suggested in of the SO post, but still getting the same error. Also I have already set TEZ engine
in hive for faster data processing but the above query launches map reduce jobs.
Why is it so? When I execute another query it gives me direct results via TEZ engine
.
Can anybody explain me this weird behaviour and as well as in solving my problem?
Environment:
1) Cloudera 5.12
2) Hive 1.1.0-cdh5.12.0
Not clear why you tagged MySQL, but
OFFSET
does not exist as part of HiveQL SELECT syntax.https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select