[ 
https://issues.apache.org/jira/browse/HIVE-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13269099#comment-13269099
 ] 

Carl Steinbach commented on HIVE-3005:
--------------------------------------

Executing a query that contains a "LIMIT 0" clause is a trick that some clients 
(e.g. ODBC clients) employ in order to generate a result set without incurring 
the cost of actually executing the query. Unfortunately, this trick doesn't 
work with Hive:

{noformat}
hive> SELECT key FROM SRC LIMIT 0;
SELECT key FROM SRC LIMIT 0;
Total MapReduce jobs = 1
Launching Job 1 out of 1
Number of reduce tasks is set to 0 since there's no reduce operator
Execution log at: 
/tmp/carl/carl_20120505182828_a5405bcb-c156-4572-b2d8-eda2cc199a14.log
Job running in-process (local Hadoop)
Hadoop job information for null: number of mappers: 0; number of reducers: 0
2012-05-05 18:28:35,999 null map = 100%,  reduce = 0%
Ended Job = job_local_0001
Execution completed successfully
Mapred Local Task Succeeded . Convert the Join into MapJoin
OK
{noformat}

                
> Query containing "LIMIT 0" clause should skip execution phase
> -------------------------------------------------------------
>
>                 Key: HIVE-3005
>                 URL: https://issues.apache.org/jira/browse/HIVE-3005
>             Project: Hive
>          Issue Type: Improvement
>          Components: Query Processor
>            Reporter: Carl Steinbach
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to