ChPi commented on code in PR #8921:
URL: https://github.com/apache/incubator-doris/pull/8921#discussion_r850254962


##########
fe/fe-core/src/main/java/org/apache/doris/backup/BackupJob.java:
##########
@@ -358,6 +358,18 @@ private void prepareAndSendSnapshotTask() {
         taskProgress.clear();
         taskErrMsg.clear();
         AgentBatchTask batchTask = new AgentBatchTask();
+
+        // remove table which has no partition
+        tableRefs = tableRefs.stream().filter(tableRef -> {
+            String tblName = tableRef.getName().getTbl();
+            Table tbl = db.getTableNullable(tblName);
+            if (tbl != null && tbl.getType() == TableType.OLAP) {
+                OlapTable olapTable = (OlapTable) tbl;
+                return !olapTable.getAllPartitions().isEmpty();

Review Comment:
   user creates a table like #8886, not create partition or  drops the 
partition.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to