Skip to content

Commit

Permalink
record features only for SELECT
Browse files Browse the repository at this point in the history
Signed-off-by: Murphy <[email protected]>
  • Loading branch information
murphyatwork committed Jan 15, 2025
1 parent ec25d5d commit bf9da27
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bf9da27

Please sign in to comment.