Skip to content

Commit 609aab0

Browse files
committed
add query plan tests for regression cases
1 parent 79e68b7 commit 609aab0

File tree

3 files changed

+158
-2
lines changed

3 files changed

+158
-2
lines changed

enginetest/queries/join_queries.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,11 +790,14 @@ on w = 0;`,
790790
Expected: []sql.Row{{"a", 4, "third", 1}, {"a", 4, "second", 2}, {"a", 4, "first", 3}},
791791
},
792792
{
793-
794-
Query: `select * from comp_index_t0 c join comp_index_t0 b join comp_index_t0 a on a.v2 = b.pk and b.v2 = c.pk and c.v2 = 1`,
793+
// Regression test ensuring that filters are not dropped after join optimization
794+
// https://github.com/dolthub/dolt/issues/9868
795+
Query: "select * from comp_index_t0 c join comp_index_t0 b join comp_index_t0 a on a.v2 = b.pk and b.v2 = c.pk and c.v2 = 1",
795796
Expected: []sql.Row{},
796797
},
797798
{
799+
// Regression test ensuring that filters are not dropped after join optimization
800+
// https://github.com/dolthub/dolt/issues/9868
798801
Query: "select * from comp_index_t0 a join comp_index_t0 b join comp_index_t0 c on a.v2 = b.pk and b.v2 = c.pk and c.v2 = 5",
799802
Expected: []sql.Row{},
800803
},

enginetest/queries/query_plans.go

Lines changed: 152 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enginetest/scriptgen/setup/helper.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,6 @@ var (
115115
XyData,
116116
Invert_pkData,
117117
JoinData,
118+
Comp_index_tablesData,
118119
}
119120
)

0 commit comments

Comments
 (0)