From bf9da276f796c6e5c4892545f7fa3e07b528eaaf Mon Sep 17 00:00:00 2001 From: Murphy Date: Wed, 15 Jan 2025 10:36:11 +0800 Subject: [PATCH] record features only for SELECT Signed-off-by: Murphy --- .../src/main/java/com/starrocks/sql/optimizer/Optimizer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);