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

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development