diff --git a/fe/fe-core/src/main/java/com/starrocks/sql/optimizer/Optimizer.java b/fe/fe-core/src/main/java/com/starrocks/sql/optimizer/Optimizer.java index c8d57e381928a..a96dc80ddf8fd 100644 --- a/fe/fe-core/src/main/java/com/starrocks/sql/optimizer/Optimizer.java +++ b/fe/fe-core/src/main/java/com/starrocks/sql/optimizer/Optimizer.java @@ -309,7 +309,8 @@ private OptExpression optimizeByCost(ConnectContext connectContext, .setPlanMemCosts(costs.getMemoryCost()); // Record the plan features into the log - if (Config.enable_plan_feature_collection) { + // NOTE: only support SELECT right now + if (Config.enable_plan_feature_collection && connectContext.getState().isQuery()) { PlanFeatures planFeatures = Explain.buildFeatures(result); String features = planFeatures.toFeatureString(); connectContext.getAuditEventBuilder().setPlanFeatures(features);