Skip to content

Commit b56c7c6

Browse files
authored
Merge pull request #2986 from dolthub/jennifer/insert-into-returning
add returning clause case for assign exec index rule
2 parents 5d82109 + 8961ce0 commit b56c7c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/analyzer/fix_exec_indexes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func assignExecIndexes(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.Sc
3838
}
3939
switch n := n.(type) {
4040
case *plan.InsertInto:
41-
if n.LiteralValueSource && len(n.Checks()) == 0 && len(n.OnDupExprs) == 0 {
41+
if n.LiteralValueSource && len(n.Checks()) == 0 && len(n.OnDupExprs) == 0 && len(n.Returning) == 0 {
4242
return n, transform.SameTree, nil
4343
}
4444
case *plan.Update:

0 commit comments

Comments
 (0)