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)));