weizhengte commented on code in PR #8861:
URL: https://github.com/apache/doris/pull/8861#discussion_r914590560


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyzeStmt.java:
##########
@@ -122,12 +125,40 @@ public List<Table> getTables() throws AnalysisException {
         return tables;
     }
 
+    public List<String> getPartitionNames() {
+        if (partitionNames == null) {
+            return Lists.newArrayList();
+        }
+        return partitionNames.getPartitionNames();
+    }
+
+    public Map<Long, List<String>> getTableIdToPartitionName() throws 
AnalysisException {
+        Preconditions.checkArgument(isAnalyzed(),
+                "The partitionIds must be obtained after the parsing is 
complete");
+        Map<Long, List<String>> tableIdToPartitionName = Maps.newHashMap();
+
+        for (Table table : getTables()) {
+            table.readLock();
+            try {
+                OlapTable olapTable = (OlapTable) table;
+                List<String> partitionNames = getPartitionNames();

Review Comment:
   Now it supports analysing all tables under the a database; supports 
analysing a single table (user can specify columns, specify partitions). In the 
case of specified conditions, it is not supported to analyze multiple tables 
with one statement. If this is necessary, we can discuss and support this 
scenario.



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