Hive
  1. Hive
  2. HIVE-3005

Skip execution phase for queries that contain "LIMIT 0" clause

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.14.0
    • Component/s: Query Processor
    • Labels:
      None

      Issue Links

        Activity

        Hide
        Carl Steinbach added a comment -

        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:

        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
        
        Show
        Carl Steinbach added a comment - 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: 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
        Hide
        Thejas M Nair added a comment -

        This has been fixed in 0.14 release. Please open new jira if you see any issues.

        Show
        Thejas M Nair added a comment - This has been fixed in 0.14 release. Please open new jira if you see any issues.

          People

          • Assignee:
            Ashutosh Chauhan
            Reporter:
            Carl Steinbach
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development