@@ -42,6 +42,7 @@ import (
4242 "github.com/dolthub/go-mysql-server/sql/expression/function"
4343 "github.com/dolthub/go-mysql-server/sql/parse"
4444 "github.com/dolthub/go-mysql-server/sql/plan"
45+ "github.com/dolthub/go-mysql-server/sql/rowexec"
4546 "github.com/dolthub/go-mysql-server/sql/types"
4647)
4748
@@ -245,7 +246,7 @@ func TestShowProcessList(t *testing.T) {
245246
246247 n := plan .NewShowProcessList ()
247248
248- iter , err := n . RowIter (ctx , nil )
249+ iter , err := rowexec . DefaultBuilder . Build (ctx , n , nil )
249250 require .NoError (err )
250251 rows , err := sql .RowIterToRows (ctx , n .Schema (), iter )
251252 require .NoError (err )
@@ -320,7 +321,7 @@ func TestTrackProcess(t *testing.T) {
320321 _ , ok = rhs .Table .(* plan.ProcessIndexableTable )
321322 require .True (ok )
322323
323- iter , err := proc . RowIter (ctx , nil )
324+ iter , err := rowexec . DefaultBuilder . Build (ctx , proc , nil )
324325 require .NoError (err )
325326 _ , err = sql .RowIterToRows (ctx , nil , iter )
326327 require .NoError (err )
@@ -357,7 +358,8 @@ func TestLockTables(t *testing.T) {
357358 })
358359 node .Catalog = analyzer .NewCatalog (sql .NewDatabaseProvider ())
359360
360- _ , err := node .RowIter (sql .NewEmptyContext (), nil )
361+ _ , err := rowexec .DefaultBuilder .Build (sql .NewEmptyContext (), node , nil )
362+
361363 require .NoError (err )
362364
363365 require .Equal (1 , t1 .writeLocks )
@@ -685,6 +687,8 @@ func TestTableFunctions(t *testing.T) {
685687 testDatabaseProvider := NewTestProvider (& databaseProvider , SimpleTableFunction {}, memory.IntSequenceTable {})
686688
687689 engine := enginetest .NewEngineWithProvider (t , harness , testDatabaseProvider )
690+ engine .Analyzer .ExecBuilder = rowexec .DefaultBuilder
691+
688692 engine , err := enginetest .RunSetupScripts (harness .NewContext (), engine , setup .MydbData , true )
689693 require .NoError (t , err )
690694
@@ -868,6 +872,7 @@ func TestCollationCoercion(t *testing.T) {
868872
869873var _ sql.TableFunction = (* SimpleTableFunction )(nil )
870874var _ sql.CollationCoercible = (* SimpleTableFunction )(nil )
875+ var _ sql.ExecSourceRel = (* SimpleTableFunction )(nil )
871876
872877// SimpleTableFunction an extremely simple implementation of TableFunction for testing.
873878// When evaluated, returns a single row: {"foo", 123}
@@ -879,6 +884,14 @@ func (s SimpleTableFunction) NewInstance(_ *sql.Context, _ sql.Database, _ []sql
879884 return SimpleTableFunction {}, nil
880885}
881886
887+ func (s SimpleTableFunction ) RowIter (ctx * sql.Context , r sql.Row ) (sql.RowIter , error ) {
888+ if s .returnedResults == true {
889+ return nil , io .EOF
890+ }
891+ s .returnedResults = true
892+ return & SimpleTableFunctionRowIter {}, nil
893+ }
894+
882895func (s SimpleTableFunction ) Resolved () bool {
883896 return true
884897}
@@ -906,16 +919,6 @@ func (s SimpleTableFunction) Children() []sql.Node {
906919 return []sql.Node {}
907920}
908921
909- func (s SimpleTableFunction ) RowIter (_ * sql.Context , _ sql.Row ) (sql.RowIter , error ) {
910- if s .returnedResults == true {
911- return nil , io .EOF
912- }
913-
914- s .returnedResults = true
915- rowIter := & SimpleTableFunctionRowIter {}
916- return rowIter , nil
917- }
918-
919922func (s SimpleTableFunction ) WithChildren (_ ... sql.Node ) (sql.Node , error ) {
920923 return s , nil
921924}
0 commit comments