[ https://issues.apache.org/jira/browse/HIVE-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13269100#comment-13269100 ]
Carl Steinbach commented on HIVE-3006: -------------------------------------- Some clients (e.g. ODBC clients) execute queries with constant WHERE clauses that are always false in order to generate a result set without incurring the expense of actually executing the query. Unfortunately, this technique does not work with Hive: {noformat} hive> SELECT key FROM src WHERE false; SELECT key FROM src WHERE false; 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_20120505183939_4008b766-5637-4c5d-8cb0-22fb222ee228.log Job running in-process (local Hadoop) Hadoop job information for null: number of mappers: 0; number of reducers: 0 2012-05-05 18:39:15,923 null map = 100%, reduce = 0% Ended Job = job_local_0001 Execution completed successfully Mapred Local Task Succeeded . Convert the Join into MapJoin OK Time taken: 3.664 seconds hive> SELECT key FROM src WHERE 1=0; SELECT key FROM src WHERE 1=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_20120505184040_074bd38d-2697-40e2-996a-91a46aaad71b.log Job running in-process (local Hadoop) Hadoop job information for null: number of mappers: 0; number of reducers: 0 2012-05-05 18:40:11,407 null map = 100%, reduce = 0% Ended Job = job_local_0001 Execution completed successfully Mapred Local Task Succeeded . Convert the Join into MapJoin OK Time taken: 3.615 seconds {noformat} > Skip execution of queries with always false WHERE clauses > --------------------------------------------------------- > > Key: HIVE-3006 > URL: https://issues.apache.org/jira/browse/HIVE-3006 > 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