jackwener commented on code in PR #18747:
URL: https://github.com/apache/doris/pull/18747#discussion_r1179024447


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/minidump/Minidump.java:
##########
@@ -0,0 +1,172 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.nereids.minidump;
+
+import org.apache.doris.catalog.ColocateTableIndex;
+import org.apache.doris.catalog.Env;
+import org.apache.doris.catalog.Table;
+import org.apache.doris.nereids.NereidsPlanner;
+import org.apache.doris.nereids.StatementContext;
+import org.apache.doris.nereids.glue.LogicalPlanAdapter;
+import org.apache.doris.nereids.parser.NereidsParser;
+import org.apache.doris.nereids.trees.plans.commands.ExplainCommand;
+import org.apache.doris.nereids.trees.plans.logical.LogicalPlan;
+import org.apache.doris.qe.ConnectContext;
+import org.apache.doris.qe.OriginStatement;
+import org.apache.doris.qe.SessionVariable;
+import org.apache.doris.statistics.ColumnStatistic;
+import org.apache.doris.statistics.Histogram;
+
+import org.json.JSONObject;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/** Minidump for Nereids */
+public class Minidump {
+    // traceflags
+
+    // optimizer configuration
+    private SessionVariable sessionVariable;
+
+    // original sql
+    private String sql;
+
+    // parsed plan in json format
+    private String parsedPlanJson;
+
+    // result plan in json format
+    private String resultPlanJson;
+
+    private String dbName;
+
+    private String catalogName;
+
+    // metadata objects
+    private List<Table> tables;
+
+    private Map<String, ColumnStatistic> totalColumnStatisticMap = new 
HashMap<>();
+
+    private Map<String, Histogram> totalHistogramMap = new HashMap<>();
+
+    private ColocateTableIndex colocateTableIndex;
+
+    /** Minidump class used to save environment messages */
+    public Minidump(String sql, SessionVariable sessionVariable,
+                    String parsedPlanJson, String resultPlanJson, List<Table> 
tables,
+                    String catalogName, String dbName, Map<String, 
ColumnStatistic> totalColumnStatisticMap,
+                    Map<String, Histogram> totalHistogramMap, 
ColocateTableIndex colocateTableIndex) {
+        this.sql = sql;
+        this.sessionVariable = sessionVariable;
+        this.parsedPlanJson = parsedPlanJson;
+        this.resultPlanJson = resultPlanJson;
+        this.tables = tables;
+        this.catalogName = catalogName;
+        this.dbName = dbName;
+        this.totalColumnStatisticMap = totalColumnStatisticMap;
+        this.totalHistogramMap = totalHistogramMap;
+        this.colocateTableIndex = colocateTableIndex;
+    }
+
+    public Minidump() {
+
+    }

Review Comment:
   why add this a empty constructor, it's easy to use wrong by others.



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