Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yisaer committed Jan 9, 2023
1 parent b85f0f0 commit 72ae03c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions planner/core/collect_column_stats_usage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,11 @@ func TestCollectHistNeededColumns(t *testing.T) {
if len(tt.pruneMode) > 0 {
s.ctx.GetSessionVars().PartitionPruneMode.Store(tt.pruneMode)
}
if s.ctx.GetSessionVars().IsDynamicPartitionPruneEnabled() {
s.ctx.GetSessionVars().StmtCtx.UseDynamicPruneMode = true
} else {
s.ctx.GetSessionVars().StmtCtx.UseDynamicPruneMode = false
}
stmt, err := s.p.ParseOneStmt(tt.sql, "", "")
require.NoError(t, err, comment)
err = Preprocess(context.Background(), s.ctx, stmt, WithPreprocessorReturn(&PreprocessorReturn{InfoSchema: s.is}))
Expand Down

0 comments on commit 72ae03c

Please sign in to comment.