Skip to content

Commit a73f5de

Browse files
committed
opt: respect disabled rules in reorderjoins test directive
Release note: None
1 parent 43c294e commit a73f5de

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/sql/opt/testutils/opttester/reorder_joins.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ import (
3333
func (ot *OptTester) ReorderJoins() (string, error) {
3434
ot.builder.Reset()
3535
o := ot.makeOptimizer()
36+
o.NotifyOnMatchedRule(func(ruleName opt.RuleName) bool {
37+
return !ot.Flags.DisableRules.Contains(int(ruleName))
38+
})
3639
jof := newJoinOrderFormatter(o)
3740

3841
// joinsConsidered counts the number of joins which joinOrderBuilder attempts

0 commit comments

Comments
 (0)