From 066e3b000e1ea3356d739cbd048d079a0571b387 Mon Sep 17 00:00:00 2001 From: angelamayxie Date: Mon, 2 Mar 2026 15:20:51 -0800 Subject: [PATCH 1/7] add TODOs, skip unnesting IN subqueries for Update nodes --- sql/analyzer/unnest_in_subqueries.go | 2 +- sql/rowexec/join_iters.go | 2 +- sql/rowexec/update.go | 18 ++++++++++++------ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/sql/analyzer/unnest_in_subqueries.go b/sql/analyzer/unnest_in_subqueries.go index 18bb9ae65e..081cbe631a 100644 --- a/sql/analyzer/unnest_in_subqueries.go +++ b/sql/analyzer/unnest_in_subqueries.go @@ -45,7 +45,7 @@ func unnestInSubqueries(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.S } switch n.(type) { - case *plan.DeleteFrom, *plan.InsertInto: + case *plan.DeleteFrom, *plan.InsertInto, *plan.Update: return n, transform.SameTree, nil } diff --git a/sql/rowexec/join_iters.go b/sql/rowexec/join_iters.go index 1c9daca744..c269c69b23 100644 --- a/sql/rowexec/join_iters.go +++ b/sql/rowexec/join_iters.go @@ -159,7 +159,7 @@ func (i *joinState) makeLeftOuterNonMatchingResult() sql.Row { return resultRow } -// makeLeftOuterNonMatchingResult returns a new sql.Row representing a row from an OUTER RIGHT join where no match was made with the left child. +// makeRightOuterNonMatchingResult returns a new sql.Row representing a row from an OUTER RIGHT join where no match was made with the left child. func (i *joinState) makeRightOuterNonMatchingResult() sql.Row { resultRow := make(sql.Row, i.resultRowSize()) copy(resultRow, i.scopeColumns()) diff --git a/sql/rowexec/update.go b/sql/rowexec/update.go index 1d037e3a17..f98931396a 100644 --- a/sql/rowexec/update.go +++ b/sql/rowexec/update.go @@ -209,12 +209,13 @@ func newUpdateIter( // done once. type updateJoinIter struct { updateSourceIter sql.RowIter - joinNode sql.Node - updaters map[string]sql.RowUpdater - caches map[string]sql.KeyValueCache - disposals map[string]sql.DisposeFunc - accumulator *updateJoinRowHandler - joinSchema sql.Schema + // TODO: naming this joinNode is confusing. It's not actually a Join node but rather an UpdateSource + joinNode sql.Node + updaters map[string]sql.RowUpdater + caches map[string]sql.KeyValueCache + disposals map[string]sql.DisposeFunc + accumulator *updateJoinRowHandler + joinSchema sql.Schema } var _ sql.RowIter = (*updateJoinIter)(nil) @@ -289,6 +290,7 @@ func (u *updateJoinIter) Next(ctx *sql.Context) (sql.Row, error) { } func toJoinNode(node sql.Node) *plan.JoinNode { + // TODO: rewrite this to use Inspect switch n := node.(type) { case *plan.JoinNode: return n @@ -348,6 +350,10 @@ func (u *updateJoinIter) shouldUpdateDirectionalJoin(ctx *sql.Context, joinRow, } // If the overall row fits the join condition it is fine (i.e. middle of the venn diagram). + // TODO: We shouldn't be evaluating the join condition on "joinRow". "joinRow" is not actually the row from the + // join node but rather the row from the updateSourceIter. The joinNode could be wrapped in a Project node and the + // indexes in the join condition would no longer match the correct columns. We also need to consider how to handle + // updateJoins where a LeftOuterJoin is filtered by a null right side. val, err := jn.JoinCond().Eval(ctx, joinRow) if err != nil { return true, err From 4d5d4901563f1b42256163e3a86e0023d23dd2ba Mon Sep 17 00:00:00 2001 From: angelamayxie Date: Mon, 2 Mar 2026 15:41:04 -0800 Subject: [PATCH 2/7] unnesting exists in update is fine, just can't get converted to left join wrapped in a project --- sql/analyzer/indexed_joins.go | 10 +++++++--- sql/analyzer/unnest_in_subqueries.go | 4 ++-- sql/rowexec/update.go | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/sql/analyzer/indexed_joins.go b/sql/analyzer/indexed_joins.go index 948e7393ab..970147dd77 100644 --- a/sql/analyzer/indexed_joins.go +++ b/sql/analyzer/indexed_joins.go @@ -172,9 +172,13 @@ func replanJoin(ctx *sql.Context, n *plan.JoinNode, a *Analyzer, scope *plan.Sco return nil, err } - err = convertAntiToLeftJoin(m) - if err != nil { - return nil, err + // TODO: updateJoinIter is not able to handle left joins wrapped in project nodes, which is what an antijoin gets + // converted to. + if !qFlags.IsSet(sql.QFlagUpdate) { + err = convertAntiToLeftJoin(m) + if err != nil { + return nil, err + } } err = addRightSemiJoins(ctx, m) diff --git a/sql/analyzer/unnest_in_subqueries.go b/sql/analyzer/unnest_in_subqueries.go index 081cbe631a..0e646256b8 100644 --- a/sql/analyzer/unnest_in_subqueries.go +++ b/sql/analyzer/unnest_in_subqueries.go @@ -43,9 +43,9 @@ func unnestInSubqueries(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.S if !qFlags.SubqueryIsSet() { return n, transform.SameTree, nil } - + switch n.(type) { - case *plan.DeleteFrom, *plan.InsertInto, *plan.Update: + case *plan.DeleteFrom, *plan.InsertInto: return n, transform.SameTree, nil } diff --git a/sql/rowexec/update.go b/sql/rowexec/update.go index f98931396a..3565418de2 100644 --- a/sql/rowexec/update.go +++ b/sql/rowexec/update.go @@ -351,7 +351,7 @@ func (u *updateJoinIter) shouldUpdateDirectionalJoin(ctx *sql.Context, joinRow, // If the overall row fits the join condition it is fine (i.e. middle of the venn diagram). // TODO: We shouldn't be evaluating the join condition on "joinRow". "joinRow" is not actually the row from the - // join node but rather the row from the updateSourceIter. The joinNode could be wrapped in a Project node and the + // join node but rather the row from the updateSourceIter. The join node could be wrapped in a Project node and the // indexes in the join condition would no longer match the correct columns. We also need to consider how to handle // updateJoins where a LeftOuterJoin is filtered by a null right side. val, err := jn.JoinCond().Eval(ctx, joinRow) From 7f49ae895dc58a5dc98e6b601b6256047322d089 Mon Sep 17 00:00:00 2001 From: angelamayxie Date: Mon, 2 Mar 2026 23:42:21 +0000 Subject: [PATCH 3/7] [ga-format-pr] Run ./format_repo.sh to fix formatting --- sql/analyzer/unnest_in_subqueries.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/analyzer/unnest_in_subqueries.go b/sql/analyzer/unnest_in_subqueries.go index 0e646256b8..18bb9ae65e 100644 --- a/sql/analyzer/unnest_in_subqueries.go +++ b/sql/analyzer/unnest_in_subqueries.go @@ -43,7 +43,7 @@ func unnestInSubqueries(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.S if !qFlags.SubqueryIsSet() { return n, transform.SameTree, nil } - + switch n.(type) { case *plan.DeleteFrom, *plan.InsertInto: return n, transform.SameTree, nil From be199c79eeed1f72b1c380ab6820c91de5dc9422 Mon Sep 17 00:00:00 2001 From: angelamayxie Date: Mon, 2 Mar 2026 15:52:19 -0800 Subject: [PATCH 4/7] add issue link --- sql/analyzer/indexed_joins.go | 2 +- sql/analyzer/unnest_in_subqueries.go | 2 +- sql/rowexec/update.go | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sql/analyzer/indexed_joins.go b/sql/analyzer/indexed_joins.go index 970147dd77..b7cdb499e4 100644 --- a/sql/analyzer/indexed_joins.go +++ b/sql/analyzer/indexed_joins.go @@ -173,7 +173,7 @@ func replanJoin(ctx *sql.Context, n *plan.JoinNode, a *Analyzer, scope *plan.Sco } // TODO: updateJoinIter is not able to handle left joins wrapped in project nodes, which is what an antijoin gets - // converted to. + // converted to. https://github.com/dolthub/dolt/issues/10614 if !qFlags.IsSet(sql.QFlagUpdate) { err = convertAntiToLeftJoin(m) if err != nil { diff --git a/sql/analyzer/unnest_in_subqueries.go b/sql/analyzer/unnest_in_subqueries.go index 0e646256b8..18bb9ae65e 100644 --- a/sql/analyzer/unnest_in_subqueries.go +++ b/sql/analyzer/unnest_in_subqueries.go @@ -43,7 +43,7 @@ func unnestInSubqueries(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.S if !qFlags.SubqueryIsSet() { return n, transform.SameTree, nil } - + switch n.(type) { case *plan.DeleteFrom, *plan.InsertInto: return n, transform.SameTree, nil diff --git a/sql/rowexec/update.go b/sql/rowexec/update.go index 3565418de2..2c94202f2e 100644 --- a/sql/rowexec/update.go +++ b/sql/rowexec/update.go @@ -353,7 +353,8 @@ func (u *updateJoinIter) shouldUpdateDirectionalJoin(ctx *sql.Context, joinRow, // TODO: We shouldn't be evaluating the join condition on "joinRow". "joinRow" is not actually the row from the // join node but rather the row from the updateSourceIter. The join node could be wrapped in a Project node and the // indexes in the join condition would no longer match the correct columns. We also need to consider how to handle - // updateJoins where a LeftOuterJoin is filtered by a null right side. + // updateJoins where a LeftOuterJoin is filtered by a null right side. JoinCond could also be nil. + // https://github.com/dolthub/dolt/issues/10614 val, err := jn.JoinCond().Eval(ctx, joinRow) if err != nil { return true, err From b4559726d083ea9f468bf6e2362e839bb66b6cab Mon Sep 17 00:00:00 2001 From: angelamayxie Date: Mon, 2 Mar 2026 16:04:06 -0800 Subject: [PATCH 5/7] add test --- enginetest/queries/update_queries.go | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/enginetest/queries/update_queries.go b/enginetest/queries/update_queries.go index 6bb5093ab7..764370279b 100644 --- a/enginetest/queries/update_queries.go +++ b/enginetest/queries/update_queries.go @@ -710,6 +710,36 @@ t1.oid = t2.pid;`, }, }, }, + { + // https://github.com/dolthub/dolt/issues/10600 + Name: "UPDATE with NOT IN subquery", + SetUpScript: []string{ + "CREATE TABLE bug_repro (id VARCHAR(32) PRIMARY KEY, status VARCHAR(16), name VARCHAR(32));", + "INSERT INTO bug_repro VALUES ('a', 'open', 'x'), ('b', 'open', 'y'), ('c', 'open', 'z');", + "UPDATE bug_repro SET status='closed' WHERE id NOT IN (SELECT id FROM bug_repro WHERE status='open' LIMIT 1);", + }, + Assertions: []ScriptTestAssertion{ + { + Query: "select * from bug_repro", + Expected: []sql.Row{ + {"a", "open", "x"}, + {"b", "closed", "y"}, + {"c", "closed", "z"}, + }, + }, + { + Query: "UPDATE bug_repro SET status='delete this' WHERE id NOT IN (SELECT id FROM bug_repro WHERE status='keep this');", + }, + { + Query: "select * from bug_repro", + Expected: []sql.Row{ + {"a", "delete this", "x"}, + {"b", "delete this", "y"}, + {"c", "delete this", "z"}, + }, + }, + }, + }, } var SpatialUpdateTests = []WriteQueryTest{ From 3240fc3849b63a7e4dec3d43ea060998e1ca9fec Mon Sep 17 00:00:00 2001 From: angelamayxie Date: Mon, 2 Mar 2026 17:11:02 -0800 Subject: [PATCH 6/7] update comment, add more test cases, move test --- enginetest/memory_engine_test.go | 66 ++++++++++++++++++++++------ enginetest/queries/script_queries.go | 49 +++++++++++++++++++++ enginetest/queries/update_queries.go | 30 ------------- sql/rowexec/update.go | 3 +- 4 files changed, 104 insertions(+), 44 deletions(-) diff --git a/enginetest/memory_engine_test.go b/enginetest/memory_engine_test.go index da0c71f127..c05c578922 100644 --- a/enginetest/memory_engine_test.go +++ b/enginetest/memory_engine_test.go @@ -193,29 +193,68 @@ func TestSingleQueryPrepared(t *testing.T) { // Convenience test for debugging a single query. Unskip and set to the desired query. func TestSingleScript(t *testing.T) { - t.Skip() var scripts = []queries.ScriptTest{ { - Name: "Parse table name as column", + // https://github.com/dolthub/dolt/issues/10600 + Name: "self-referential NOT IN subquery", SetUpScript: []string{ - `CREATE TABLE test (pk INT PRIMARY KEY, v1 VARCHAR(255));`, - `INSERT INTO test VALUES (1, 'a'), (2, 'b');`, + "CREATE TABLE bug_repro (id VARCHAR(32) PRIMARY KEY, status VARCHAR(16), name VARCHAR(32));", + "INSERT INTO bug_repro VALUES ('a', 'open', 'x'), ('b', 'open', 'y'), ('c', 'open', 'z');", }, Assertions: []queries.ScriptTestAssertion{ { - Query: "SELECT temporarytesting(t) FROM test AS t;", - Expected: []sql.Row{}, + Query: "SELECT * FROM bug_repro WHERE id NOT IN (SELECT id FROM bug_repro WHERE status='open' LIMIT 1);", + Expected: []sql.Row{ + {"b", "open", "y"}, + {"c", "open", "z"}, + }, }, { - Query: "SELECT temporarytesting(test) FROM test;", - Expected: []sql.Row{}, + Query: "UPDATE bug_repro SET status='closed' WHERE id NOT IN (SELECT id FROM bug_repro WHERE status='open' LIMIT 1);", + Expected: []sql.Row{{queries.NewUpdateResult(2, 2)}}, }, { - Query: "SELECT temporarytesting(pk, test) FROM test;", - Expected: []sql.Row{}, + Query: "INSERT INTO bug_repro VALUES ('d', 'open', 'zz')", + Expected: []sql.Row{{types.NewOkResult(1)}}, + }, + { + Query: "DELETE FROM bug_repro WHERE status='open' AND id NOT IN (SELECT id FROM bug_repro WHERE status='open' LIMIT 1);", + Expected: []sql.Row{{types.NewOkResult(1)}}, + }, + { + Query: "select * from bug_repro", + Expected: []sql.Row{ + {"a", "open", "x"}, + {"b", "closed", "y"}, + {"c", "closed", "z"}, + }, }, { - Query: "SELECT temporarytesting(v1, test, pk) FROM test;", + Query: "UPDATE bug_repro SET status='delete this' WHERE id NOT IN (SELECT id FROM bug_repro WHERE status='keep this');", + Expected: []sql.Row{{queries.NewUpdateResult(3, 3)}}, + }, + { + Query: "select * from bug_repro", + Expected: []sql.Row{ + {"a", "delete this", "x"}, + {"b", "delete this", "y"}, + {"c", "delete this", "z"}, + }, + }, + }, + }, + { + Skip: true, + SetUpScript: []string{ + "create table vals (val int unique key);", + "create table ranges (min int unique key, max int, unique key(min,max));", + "insert into vals values (null), (0), (1), (2), (3), (4), (5), (6);", + "insert into ranges values (null,1), (0,2), (1,3), (2,4), (3,5), (4,6);", + }, + Assertions: []queries.ScriptTestAssertion{ + { + Skip: true, + Query: "select * from vals where exists (select * from ranges where val between min and max limit 0);", Expected: []sql.Row{}, }, }, @@ -230,8 +269,9 @@ func TestSingleScript(t *testing.T) { panic(err) } - // engine.EngineAnalyzer().Debug = true - // engine.EngineAnalyzer().Verbose = true + engine.EngineAnalyzer().Debug = true + engine.EngineAnalyzer().Verbose = true + // engine.EngineAnalyzer().Coster = memo.NewMergeBiasedCoster() enginetest.TestScriptWithEngine(t, engine, harness, test) } diff --git a/enginetest/queries/script_queries.go b/enginetest/queries/script_queries.go index d1dd30fd59..7cc540e713 100644 --- a/enginetest/queries/script_queries.go +++ b/enginetest/queries/script_queries.go @@ -14883,6 +14883,55 @@ select * from t1 except ( }, }, }, + { + // https://github.com/dolthub/dolt/issues/10600 + Name: "self-referential NOT IN subquery", + SetUpScript: []string{ + "CREATE TABLE bug_repro (id VARCHAR(32) PRIMARY KEY, status VARCHAR(16), name VARCHAR(32));", + "INSERT INTO bug_repro VALUES ('a', 'open', 'x'), ('b', 'open', 'y'), ('c', 'open', 'z');", + }, + Assertions: []ScriptTestAssertion{ + { + Query: "SELECT * FROM bug_repro WHERE id NOT IN (SELECT id FROM bug_repro WHERE status='open' LIMIT 1);", + Expected: []sql.Row{ + {"b", "open", "y"}, + {"c", "open", "z"}, + }, + }, + { + Query: "UPDATE bug_repro SET status='closed' WHERE id NOT IN (SELECT id FROM bug_repro WHERE status='open' LIMIT 1);", + Expected: []sql.Row{{NewUpdateResult(2, 2)}}, + }, + { + Query: "INSERT INTO bug_repro VALUES ('d', 'open', 'zz')", + Expected: []sql.Row{{types.NewOkResult(1)}}, + }, + { + Query: "DELETE FROM bug_repro WHERE status='open' AND id NOT IN (SELECT id FROM bug_repro WHERE status='open' LIMIT 1);", + Expected: []sql.Row{{types.NewOkResult(1)}}, + }, + { + Query: "select * from bug_repro", + Expected: []sql.Row{ + {"a", "open", "x"}, + {"b", "closed", "y"}, + {"c", "closed", "z"}, + }, + }, + { + Query: "UPDATE bug_repro SET status='delete this' WHERE id NOT IN (SELECT id FROM bug_repro WHERE status='keep this');", + Expected: []sql.Row{{NewUpdateResult(3, 3)}}, + }, + { + Query: "select * from bug_repro", + Expected: []sql.Row{ + {"a", "delete this", "x"}, + {"b", "delete this", "y"}, + {"c", "delete this", "z"}, + }, + }, + }, + }, } var SpatialScriptTests = []ScriptTest{ diff --git a/enginetest/queries/update_queries.go b/enginetest/queries/update_queries.go index 764370279b..6bb5093ab7 100644 --- a/enginetest/queries/update_queries.go +++ b/enginetest/queries/update_queries.go @@ -710,36 +710,6 @@ t1.oid = t2.pid;`, }, }, }, - { - // https://github.com/dolthub/dolt/issues/10600 - Name: "UPDATE with NOT IN subquery", - SetUpScript: []string{ - "CREATE TABLE bug_repro (id VARCHAR(32) PRIMARY KEY, status VARCHAR(16), name VARCHAR(32));", - "INSERT INTO bug_repro VALUES ('a', 'open', 'x'), ('b', 'open', 'y'), ('c', 'open', 'z');", - "UPDATE bug_repro SET status='closed' WHERE id NOT IN (SELECT id FROM bug_repro WHERE status='open' LIMIT 1);", - }, - Assertions: []ScriptTestAssertion{ - { - Query: "select * from bug_repro", - Expected: []sql.Row{ - {"a", "open", "x"}, - {"b", "closed", "y"}, - {"c", "closed", "z"}, - }, - }, - { - Query: "UPDATE bug_repro SET status='delete this' WHERE id NOT IN (SELECT id FROM bug_repro WHERE status='keep this');", - }, - { - Query: "select * from bug_repro", - Expected: []sql.Row{ - {"a", "delete this", "x"}, - {"b", "delete this", "y"}, - {"c", "delete this", "z"}, - }, - }, - }, - }, } var SpatialUpdateTests = []WriteQueryTest{ diff --git a/sql/rowexec/update.go b/sql/rowexec/update.go index 2c94202f2e..7a5474263e 100644 --- a/sql/rowexec/update.go +++ b/sql/rowexec/update.go @@ -209,7 +209,8 @@ func newUpdateIter( // done once. type updateJoinIter struct { updateSourceIter sql.RowIter - // TODO: naming this joinNode is confusing. It's not actually a Join node but rather an UpdateSource + // TODO: naming this joinNode is confusing. It's not always a join node because it could be wrapped inside another + // node joinNode sql.Node updaters map[string]sql.RowUpdater caches map[string]sql.KeyValueCache From 77bcfb108ed5fe2737f84029ebcc9e0cbec65076 Mon Sep 17 00:00:00 2001 From: angelamayxie Date: Mon, 2 Mar 2026 17:12:03 -0800 Subject: [PATCH 7/7] restore memory engine test --- enginetest/memory_engine_test.go | 66 +++++++------------------------- 1 file changed, 13 insertions(+), 53 deletions(-) diff --git a/enginetest/memory_engine_test.go b/enginetest/memory_engine_test.go index c05c578922..da0c71f127 100644 --- a/enginetest/memory_engine_test.go +++ b/enginetest/memory_engine_test.go @@ -193,68 +193,29 @@ func TestSingleQueryPrepared(t *testing.T) { // Convenience test for debugging a single query. Unskip and set to the desired query. func TestSingleScript(t *testing.T) { + t.Skip() var scripts = []queries.ScriptTest{ { - // https://github.com/dolthub/dolt/issues/10600 - Name: "self-referential NOT IN subquery", + Name: "Parse table name as column", SetUpScript: []string{ - "CREATE TABLE bug_repro (id VARCHAR(32) PRIMARY KEY, status VARCHAR(16), name VARCHAR(32));", - "INSERT INTO bug_repro VALUES ('a', 'open', 'x'), ('b', 'open', 'y'), ('c', 'open', 'z');", + `CREATE TABLE test (pk INT PRIMARY KEY, v1 VARCHAR(255));`, + `INSERT INTO test VALUES (1, 'a'), (2, 'b');`, }, Assertions: []queries.ScriptTestAssertion{ { - Query: "SELECT * FROM bug_repro WHERE id NOT IN (SELECT id FROM bug_repro WHERE status='open' LIMIT 1);", - Expected: []sql.Row{ - {"b", "open", "y"}, - {"c", "open", "z"}, - }, - }, - { - Query: "UPDATE bug_repro SET status='closed' WHERE id NOT IN (SELECT id FROM bug_repro WHERE status='open' LIMIT 1);", - Expected: []sql.Row{{queries.NewUpdateResult(2, 2)}}, - }, - { - Query: "INSERT INTO bug_repro VALUES ('d', 'open', 'zz')", - Expected: []sql.Row{{types.NewOkResult(1)}}, - }, - { - Query: "DELETE FROM bug_repro WHERE status='open' AND id NOT IN (SELECT id FROM bug_repro WHERE status='open' LIMIT 1);", - Expected: []sql.Row{{types.NewOkResult(1)}}, - }, - { - Query: "select * from bug_repro", - Expected: []sql.Row{ - {"a", "open", "x"}, - {"b", "closed", "y"}, - {"c", "closed", "z"}, - }, + Query: "SELECT temporarytesting(t) FROM test AS t;", + Expected: []sql.Row{}, }, { - Query: "UPDATE bug_repro SET status='delete this' WHERE id NOT IN (SELECT id FROM bug_repro WHERE status='keep this');", - Expected: []sql.Row{{queries.NewUpdateResult(3, 3)}}, + Query: "SELECT temporarytesting(test) FROM test;", + Expected: []sql.Row{}, }, { - Query: "select * from bug_repro", - Expected: []sql.Row{ - {"a", "delete this", "x"}, - {"b", "delete this", "y"}, - {"c", "delete this", "z"}, - }, + Query: "SELECT temporarytesting(pk, test) FROM test;", + Expected: []sql.Row{}, }, - }, - }, - { - Skip: true, - SetUpScript: []string{ - "create table vals (val int unique key);", - "create table ranges (min int unique key, max int, unique key(min,max));", - "insert into vals values (null), (0), (1), (2), (3), (4), (5), (6);", - "insert into ranges values (null,1), (0,2), (1,3), (2,4), (3,5), (4,6);", - }, - Assertions: []queries.ScriptTestAssertion{ { - Skip: true, - Query: "select * from vals where exists (select * from ranges where val between min and max limit 0);", + Query: "SELECT temporarytesting(v1, test, pk) FROM test;", Expected: []sql.Row{}, }, }, @@ -269,9 +230,8 @@ func TestSingleScript(t *testing.T) { panic(err) } - engine.EngineAnalyzer().Debug = true - engine.EngineAnalyzer().Verbose = true - // engine.EngineAnalyzer().Coster = memo.NewMergeBiasedCoster() + // engine.EngineAnalyzer().Debug = true + // engine.EngineAnalyzer().Verbose = true enginetest.TestScriptWithEngine(t, engine, harness, test) }