Skip to content

Commit d397f96

Browse files
author
James Cor
committed
nil check
1 parent 90c2189 commit d397f96

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sql/analyzer/inserts.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ func resolveInsertRows(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.Sc
6767
// scope = &plan.Scope{}
6868
// }
6969
//}
70-
scope.InInsertSource = true // TODO: use a setter?
70+
if scope != nil {
71+
scope.InInsertSource = true // TODO: use a setter?
72+
}
7173
source, _, err = a.analyzeWithSelector(ctx, insert.Source, scope, SelectAllBatches, newInsertSourceSelector(sel), qFlags)
7274
if err != nil {
7375
return nil, transform.SameTree, err

0 commit comments

Comments
 (0)