[test](regression) add some regression cases on constant evaluation. (#16599)

This commit is contained in:
luozenglin
2023-02-28 10:57:37 +08:00
committed by GitHub
parent da2e9f4179
commit 17c8123371
2 changed files with 19 additions and 1 deletions

View File

@ -27,3 +27,12 @@ false 7 -32767 1002 7210457 3.141 false 1988-03-21 1901-01-01T00:00 jiw3n4 0.0 6
true 8 255 2147483647 11011920 -0.123 true 1989-03-21 9999-11-11T12:12 wangjuoo5 987456.123 12.14 string12345 -2022
true 9 1991 -2147483647 11011902 -654.654 true 1991-08-11 1989-03-21T13:11 wangjuoo4 0.0 69.123 string12345 11011903
-- !sql6 --
-- !sql7 --
1 -1
2 -1
3 -1
-- !sql8 --

View File

@ -45,4 +45,13 @@ suite("test_subquery") {
qt_sql5 """
select * from test_query_db.bigtable where exists (select k2, k1 from test_query_db.baseall order by k1) order by k1, k2, k3, k4 limit 10;
"""
}
qt_sql6 "select k1 from (select k1, -1 as c from test_query_db.test) t where t.c = 1;"
qt_sql7 "select * from (select k1, -1 as c from test_query_db.test) t where t.c < 0 order by 1;"
qt_sql8 """
select * from (select k1, -1 as c from test_query_db.test union all select k1, -2 as c from test_query_db.baseall) t
where t.c > 0;
"""
}