Skip to content

Commit 12ff127

Browse files
jycorJames Cor
andauthored
test aggregates over indexes with false filter (#3097)
Co-authored-by: James Cor <[email protected]>
1 parent 0429d89 commit 12ff127

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

enginetest/queries/index_queries.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4512,4 +4512,25 @@ var IndexQueries = []ScriptTest{
45124512
},
45134513
},
45144514
},
4515+
{
4516+
Name: "aggregates using indexes with false filter",
4517+
SetUpScript: []string{
4518+
"create table pk_tbl (i int primary key);",
4519+
"create table unq_tbl (i int unique key);",
4520+
},
4521+
Assertions: []ScriptTestAssertion{
4522+
{
4523+
Query: "select count(*) from pk_tbl where (i = 0 and i = 1);",
4524+
Expected: []sql.Row{
4525+
{0},
4526+
},
4527+
},
4528+
{
4529+
Query: "select count(*) from unq_tbl where (i = 0 and i = 1);",
4530+
Expected: []sql.Row{
4531+
{0},
4532+
},
4533+
},
4534+
},
4535+
},
45154536
}

0 commit comments

Comments
 (0)