morrySnow commented on code in PR #13659:
URL: https://github.com/apache/doris/pull/13659#discussion_r1034806275


##########
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java:
##########
@@ -634,6 +642,41 @@ public void initFuzzyModeVariables() {
         this.enableShareHashTableForBroadcastJoin = random.nextBoolean();
     }
 
+    /**
+     * syntax:
+     * all -> use all event
+     * all except event_1, event_2, ..., event_n -> use all events excluding 
the event_1~n
+     * event_1, event_2, ..., event_n -> use event_1~n
+     */
+    @VariableMgr.VarAttr(name = NEREIDS_TRACE_EVENT_MODE)
+    public String nereidsTraceEventMode = "all";
+
+    private Set<Class<? extends Event>> parsedNereidsEventMode = 
EventSwitchParser.parse(Lists.newArrayList("all"));
+    private String cachedNereidsTraceEventMode = "all";
+
+    public void setEnableNereidsTrace(boolean enableNereidsTrace) {
+        this.enableNereidsTrace = enableNereidsTrace;
+    }
+
+    public void setNereidsTraceEventMode(String nereidsTraceEventMode) {
+        this.nereidsTraceEventMode = nereidsTraceEventMode;
+    }
+
+    public Set<Class<? extends Event>> getParsedNereidsEventMode() {

Review Comment:
   it is still has the problem that user can execute statement like:
   ```sql
   set nereids_trace_event_mode=xxxxx;
   ```
   and cannot reveive any error message



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/StatementContext.java:
##########
@@ -40,7 +40,7 @@ public class StatementContext {
     private StatementBase parsedStatement;
 
     public StatementContext() {
-        this.connectContext = ConnectContext.get();
+        setConnectContext(ConnectContext.get());

Review Comment:
   why change to set?



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/Job.java:
##########
@@ -39,12 +46,15 @@
  * Abstract class for all job using for analyze and optimize query plan in 
Nereids.
  */
 public abstract class Job {
+    protected static final EventProducer COUNTER_TRACER = new 
EventProducer(CounterEvent.class,

Review Comment:
   not see any comment



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