You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by sz...@apache.org on 2019/11/13 14:13:59 UTC

[hive] branch master updated: HIVE-22279: Enable temporary table partitioning (Laszlo Pinter, reviewed by Adam Szita)

This is an automated email from the ASF dual-hosted git repository.

szita pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 065f305  HIVE-22279: Enable temporary table partitioning (Laszlo Pinter, reviewed by Adam Szita)
065f305 is described below

commit 065f305c773d67d0065e27b2dac2353065e24d3b
Author: Laszlo Pinter <lp...@cloudera.com>
AuthorDate: Wed Nov 13 15:06:07 2019 +0100

    HIVE-22279: Enable temporary table partitioning (Laszlo Pinter, reviewed by Adam Szita)
---
 ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java | 8 --------
 ql/src/test/queries/clientnegative/temp_table_partitions.q        | 2 --
 ql/src/test/results/clientnegative/temp_table_partitions.q.out    | 1 -
 3 files changed, 11 deletions(-)

diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
index e9b035d..a248fd7 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
@@ -13548,10 +13548,6 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
     }
 
     if (isTemporary) {
-      if (partCols.size() > 0) {
-        throw new SemanticException("Partition columns are not supported on temporary tables");
-      }
-
       if (location == null) {
         // for temporary tables we set the location to something in the session's scratch dir
         // it has the same life cycle as the tmp table
@@ -13630,10 +13626,6 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
       Table likeTable = getTable(likeTableName, false);
       if (likeTable != null) {
         if (isTemporary) {
-          if (likeTable.getPartCols().size() > 0) {
-            throw new SemanticException("Partition columns are not supported on temporary tables "
-                + "and source table in CREATE TABLE LIKE is partitioned.");
-          }
           updateDefaultTblProps(likeTable.getParameters(), tblProps,
               new ArrayList<>(Arrays.asList(hive_metastoreConstants.TABLE_IS_TRANSACTIONAL,
                   hive_metastoreConstants.TABLE_TRANSACTIONAL_PROPERTIES)));
diff --git a/ql/src/test/queries/clientnegative/temp_table_partitions.q b/ql/src/test/queries/clientnegative/temp_table_partitions.q
deleted file mode 100644
index 9592785..0000000
--- a/ql/src/test/queries/clientnegative/temp_table_partitions.q
+++ /dev/null
@@ -1,2 +0,0 @@
--- temp tables with partition columns not currently supported
-create temporary table tmp1 (c1 string) partitioned by (p1 string);
diff --git a/ql/src/test/results/clientnegative/temp_table_partitions.q.out b/ql/src/test/results/clientnegative/temp_table_partitions.q.out
deleted file mode 100644
index c213318..0000000
--- a/ql/src/test/results/clientnegative/temp_table_partitions.q.out
+++ /dev/null
@@ -1 +0,0 @@
-FAILED: SemanticException Partition columns are not supported on temporary tables