Skip to content

Commit 506cb90

Browse files
author
James Cor
committed
tidying up
1 parent 8e74d39 commit 506cb90

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

engine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ func finalizeIters(ctx *sql.Context, analyzed sql.Node, qFlags *sql.QueryFlags,
898898
var err error
899899
var sch sql.Schema
900900
// TODO: if this is does something we need to overwrite the schema with types.OkResultSchema
901-
iter, sch, err = rowexec.AddAccumulatorIter(ctx, analyzed, iter)
901+
iter, sch, err = rowexec.AddAccumulatorIter(ctx, iter)
902902
if err != nil {
903903
return nil, nil, err
904904
}

engine_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ func TestTrackProcess(t *testing.T) {
232232

233233
iter, err := rowexec.DefaultBuilder.Build(ctx, result, nil)
234234
require.NoError(err)
235-
iter, err = finalizeIters(ctx, result, nil, iter)
235+
iter, _, err = finalizeIters(ctx, result, nil, iter)
236236
require.NoError(err)
237237
_, err = sql.RowIterToRows(ctx, iter)
238238
require.NoError(err)

sql/rowexec/dml_iters.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,14 +563,14 @@ func getRowHandler(clientFoundRowsToggled bool, iter sql.RowIter) accumulatorRow
563563
}
564564
}
565565

566-
func AddAccumulatorIter(ctx *sql.Context, node sql.Node, iter sql.RowIter) (sql.RowIter, sql.Schema, error) {
566+
func AddAccumulatorIter(ctx *sql.Context, iter sql.RowIter) (sql.RowIter, sql.Schema, error) {
567567
switch i := iter.(type) {
568568
case *callIter:
569-
childIter, sch, err := AddAccumulatorIter(ctx, node, i.innerIter)
569+
childIter, sch, err := AddAccumulatorIter(ctx, i.innerIter)
570570
i.innerIter = childIter
571571
return i, sch, err
572572
case *beginEndIter:
573-
childIter, sch, err := AddAccumulatorIter(ctx, node, i.rowIter)
573+
childIter, sch, err := AddAccumulatorIter(ctx, i.rowIter)
574574
i.rowIter = childIter
575575
return i, sch, err
576576
default:

sql/rowexec/other.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ func (b *BaseBuilder) buildBlock(ctx *sql.Context, n *plan.Block, row sql.Row) (
223223
returnNode = subIterNode
224224
returnIter = subIter
225225
returnSch = types.OkResultSchema
226-
//returnSch = subIterSch
227226
}
228227

229228
for {

0 commit comments

Comments
 (0)