zhiqiang-hhhh commented on code in PR #46375:
URL: https://github.com/apache/doris/pull/46375#discussion_r1908082865


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowLoadProfileCommand.java:
##########
@@ -17,37 +17,51 @@
 
 package org.apache.doris.nereids.trees.plans.commands;
 
-import org.apache.doris.catalog.Env;
-import org.apache.doris.common.Config;
-import org.apache.doris.common.UserException;
+import org.apache.doris.catalog.Column;
+import org.apache.doris.catalog.ScalarType;
+import org.apache.doris.common.profile.ProfileManager;
+import org.apache.doris.common.profile.ProfileManager.ProfileType;
+import org.apache.doris.common.profile.SummaryProfile;
 import org.apache.doris.nereids.trees.plans.PlanType;
 import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor;
 import org.apache.doris.qe.ConnectContext;
 import org.apache.doris.qe.ShowResultSet;
+import org.apache.doris.qe.ShowResultSetMetaData;
 import org.apache.doris.qe.StmtExecutor;
 
+import java.util.List;
+
 /**
  * show load profile command
  */
 public class ShowLoadProfileCommand extends ShowCommand {
-    private String loadIdPath;
+    public static final ShowResultSetMetaData META_DATA_QUERY_IDS;
+
+    static {
+        ShowResultSetMetaData.Builder builder = 
ShowResultSetMetaData.builder();
+        for (String key : SummaryProfile.SUMMARY_CAPTIONS) {
+            if (key.equals(SummaryProfile.DISTRIBUTED_PLAN)) {
+                continue;
+            }
+            builder.addColumn(new Column(key, ScalarType.createStringType()));
+        }
+        META_DATA_QUERY_IDS = builder.build();
+    }
+
+    private long limit = 20;
 
     /**
      * constructor
      */
-    public ShowLoadProfileCommand(String path) {
+    public ShowLoadProfileCommand(String path, long limit) {
         super(PlanType.SHOW_LOAD_PROFILE_COMMAND);
-        this.loadIdPath = path;

Review Comment:
   > when does this path been used?
   
   For now, never. Maybe could be used in the future.
   
   It is kept for syntactic compatibility. In previous we support get 
query/fragment/instance profile through this command.



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