Skip to content

Commit e7b7ae1

Browse files
authored
[no-release-notes] track join memos for external use (#2917)
1 parent 733cd2c commit e7b7ae1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

sql/analyzer/indexed_joins.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ func replanJoin(ctx *sql.Context, n *plan.JoinNode, a *Analyzer, scope *plan.Sco
216216
if a.Verbose && a.Debug {
217217
a.Log(m.String())
218218
}
219+
if scope != nil {
220+
scope.JoinTrees = append(scope.JoinTrees, m.String())
221+
}
219222

220223
return m.BestRootPlan(ctx)
221224
}

sql/plan/scope.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ type Scope struct {
4343
inJoin bool
4444
inLateralJoin bool
4545
joinSiblings []sql.Node
46+
JoinTrees []string
4647
}
4748

4849
func (s *Scope) SetJoin(b bool) {

0 commit comments

Comments
 (0)