diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java index 11e35d0de4..225992c7fd 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java @@ -13544,10 +13544,6 @@ ASTNode analyzeCreateTable( } 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 @@ -13626,10 +13622,6 @@ ASTNode analyzeCreateTable( 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 ql/src/test/queries/clientnegative/temp_table_partitions.q ql/src/test/queries/clientnegative/temp_table_partitions.q deleted file mode 100644 index 9592785053..0000000000 --- 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 ql/src/test/results/clientnegative/temp_table_partitions.q.out ql/src/test/results/clientnegative/temp_table_partitions.q.out deleted file mode 100644 index c21331841e..0000000000 --- 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