Support Questions
Find answers, ask questions, and share your expertise

Hive storage handlers -- LIMIT clause

Hive storage handlers -- LIMIT clause

Explorer

When a SELECT query is issued against a Hive storage handler, is there a way for the SH to tell whether the query has a LIMIT clause, e.g. SELECT * FROM my_storage_handler LIMIT 1?

Thanks in advance for any help.

4 REPLIES 4

Re: Hive storage handlers -- LIMIT clause

Explorer

Hi Dayou,

yes, we can specify LIMIT as part of query

SELECT * FROM t1 LIMIT 5

Re: Hive storage handlers -- LIMIT clause

Explorer

Hi @shiremath, thanks for the reply. Yes, but my question was, in the storage handler code for t1 (in your example), is there a way to find out that the LIMIT clause was (or was not) specified in the query?

Re: Hive storage handlers -- LIMIT clause

Explorer

Re: Hive storage handlers -- LIMIT clause

Explorer

Hi @shiremath, thanks again. Yes I'm familiar with both links, and I'm handling predicate pushdown just fine by following the 2nd link, which is exactly why I'm wondering whether there is a similar way to capture the LIMIT, which is of course not the same as the WHERE clause.