Skip to content

Commit

Permalink
xform: mark PruneScanCols rule as essential
Browse files Browse the repository at this point in the history
This allows us to not error when retrieving the database name
(previously this could fail a logic test or be seen in a demo).

Release note: None
  • Loading branch information
yuzefovich committed Sep 8, 2022
1 parent 5b8a6e2 commit 3826e81
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/sql/opt/xform/optimizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,9 @@ func (o *Optimizer) disableRulesRandom(probability float64) {
// Needed to prevent rule cycles that lead to timeouts and OOMs.
int(opt.EliminateProject),
int(opt.EliminateSelect),
// Needed to make sure that dummy columns are pruned so that the
// database name is retrieved correctly.
int(opt.PruneScanCols),
)

var disabledRules RuleSet
Expand Down

0 comments on commit 3826e81

Please sign in to comment.