Skip to content

Commit 0365f1d

Browse files
author
James Cor
committed
tidying up
1 parent 0c5a323 commit 0365f1d

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

sql/rowexec/builder.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ package rowexec
1717
import (
1818
"runtime/trace"
1919

20-
"github.com/dolthub/go-mysql-server/sql/plan"
21-
2220
"github.com/dolthub/go-mysql-server/sql"
21+
"github.com/dolthub/go-mysql-server/sql/plan"
2322
)
2423

2524
var DefaultBuilder = &BaseBuilder{}

sql/rowexec/dml_iters.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -528,24 +528,14 @@ func getRowHandler(clientFoundRowsToggled bool, iter sql.RowIter) accumulatorRow
528528
return getRowHandler(clientFoundRowsToggled, i.child)
529529
case *blockIter:
530530
return getRowHandler(clientFoundRowsToggled, i.repIter)
531-
case *insertIter:
532-
if i.replacer != nil {
533-
return &replaceRowHandler{}
534-
}
535-
if i.updater != nil {
536-
return &onDuplicateUpdateHandler{schema: i.schema, clientFoundRowsCapability: clientFoundRowsToggled}
537-
}
538-
return &insertRowHandler{}
539-
case *deleteIter:
540-
return &deleteRowHandler{}
541531
case *updateIter:
542532
// it's possible that there's an updateJoinIter that's not the immediate child of updateIter
543533
rowHandler := getRowHandler(clientFoundRowsToggled, i.childIter)
544534
if rowHandler != nil {
545535
return rowHandler
546536
}
547537
sch := i.schema
548-
// special case for foreign keys, plan.ForeignKeyHandler.Schema() returns original schema
538+
// special case for foreign keys; plan.ForeignKeyHandler.Schema() returns original schema
549539
if fkHandler, isFk := i.updater.(*plan.ForeignKeyHandler); isFk {
550540
sch = fkHandler.Sch
551541
}
@@ -558,6 +548,16 @@ func getRowHandler(clientFoundRowsToggled bool, iter sql.RowIter) accumulatorRow
558548
}
559549
i.accumulator = rowHandler
560550
return rowHandler
551+
case *insertIter:
552+
if i.replacer != nil {
553+
return &replaceRowHandler{}
554+
}
555+
if i.updater != nil {
556+
return &onDuplicateUpdateHandler{schema: i.schema, clientFoundRowsCapability: clientFoundRowsToggled}
557+
}
558+
return &insertRowHandler{}
559+
case *deleteIter:
560+
return &deleteRowHandler{}
561561
default:
562562
return nil
563563
}

0 commit comments

Comments
 (0)