From 34733b7d1b2693eb6ea147413bcf05c5096a7580 Mon Sep 17 00:00:00 2001 From: worker24h Date: Thu, 22 Aug 2019 16:38:10 +0800 Subject: [PATCH] fixbug: I can't create a new partition when paritions of a table is empty --- fe/src/main/java/org/apache/doris/alter/Alter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fe/src/main/java/org/apache/doris/alter/Alter.java b/fe/src/main/java/org/apache/doris/alter/Alter.java index 4d0828a4e4eb8c..2a3e7278e7f864 100644 --- a/fe/src/main/java/org/apache/doris/alter/Alter.java +++ b/fe/src/main/java/org/apache/doris/alter/Alter.java @@ -167,7 +167,7 @@ public void processAlterTable(AlterTableStmt stmt) throws DdlException { OlapTable olapTable = (OlapTable) table; - if (olapTable.getPartitions().size() == 0) { + if (olapTable.getPartitions().size() == 0 && !hasPartition) { throw new DdlException("table with empty parition cannot do schema change. [" + tableName + "]"); }