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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to