Hive
  1. Hive
  2. HIVE-7090

Support session-level temporary tables in Hive

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.14.0
    • Component/s: SQL
    • Labels:
      None

      Description

      It's common to see sql scripts that create some temporary table as an intermediate result, run some additional queries against it and then clean up at the end.

      We should support temporary tables properly, meaning automatically manage the life cycle and make sure the visibility is restricted to the creating connection/session. Without these it's common to see left over tables in meta-store or weird errors with clashing tmp table names.

      Proposed syntax:

      CREATE TEMPORARY TABLE ....

      CTAS, CTL, INSERT INTO, should all be supported as usual.

      Knowing that a user wants a temp table can enable us to further optimize access to it. E.g.: temp tables should be kept in memory where possible, compactions and merging table files aren't required, ...

      1. HIVE-7090.1.patch
        85 kB
        Gunther Hagleitner
      2. HIVE-7090.2.patch
        96 kB
        Jason Dere
      3. HIVE-7090.3.patch
        96 kB
        Jason Dere
      4. HIVE-7090.4.patch
        208 kB
        Jason Dere
      5. HIVE-7090.5.patch
        213 kB
        Jason Dere
      6. HIVE-7090.6.patch
        212 kB
        Jason Dere
      7. HIVE-7090.7.patch
        214 kB
        Jason Dere
      8. HIVE-7090.8.patch
        218 kB
        Jason Dere
      9. HIVE-7090.9.patch
        218 kB
        Jason Dere

        Issue Links

          Activity

          Gunther Hagleitner created issue -
          Gunther Hagleitner made changes -
          Field Original Value New Value
          Assignee Harish Butani [ rhbutani ]
          Gunther Hagleitner made changes -
          Attachment HIVE-7090.1.patch [ 12645654 ]
          Gunther Hagleitner made changes -
          Component/s SQL [ 12315100 ]
          Jason Dere made changes -
          Attachment HIVE-7090.2.patch [ 12652031 ]
          Jason Dere made changes -
          Attachment HIVE-7090.3.patch [ 12652086 ]
          Navis made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Jason Dere made changes -
          Assignee Harish Butani [ rhbutani ] Jason Dere [ jdere ]
          Jason Dere made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Jason Dere made changes -
          Attachment HIVE-7090.4.patch [ 12652537 ]
          Jason Dere made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Jason Dere made changes -
          Remote Link This issue links to "https://reviews.apache.org/r/22996/ (Web Link)" [ 15578 ]
          Jason Dere made changes -
          Attachment HIVE-7090.5.patch [ 12652594 ]
          Jason Dere made changes -
          Attachment HIVE-7090.6.patch [ 12652926 ]
          Gopal V made changes -
          Link This issue is related to HIVE-7313 [ HIVE-7313 ]
          Jason Dere made changes -
          Attachment HIVE-7090.7.patch [ 12653646 ]
          Jason Dere made changes -
          Attachment HIVE-7090.8.patch [ 12654353 ]
          Jason Dere made changes -
          Attachment HIVE-7090.9.patch [ 12654866 ]
          Jason Dere made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Fix Version/s 0.14.0 [ 12326450 ]
          Resolution Fixed [ 1 ]
          Jason Dere made changes -
          Issue Type Bug [ 1 ] New Feature [ 2 ]
          Lefty Leverenz made changes -
          Labels TODOC14
          Lefty Leverenz made changes -
          Labels TODOC14
          Jason Dere made changes -
          Link This issue relates to HIVE-7638 [ HIVE-7638 ]
          Lefty Leverenz made changes -
          Link This issue is related to HIVE-7649 [ HIVE-7649 ]
          Thejas M Nair made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Jason Dere
              Reporter:
              Gunther Hagleitner
            • Votes:
              0 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development