Skip to content

Commit

Permalink
update test case
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangstar333 committed Nov 1, 2023
1 parent e569a6b commit f4d1f8d
Show file tree
Hide file tree
Showing 2 changed files with 198 additions and 5 deletions.
172 changes: 171 additions & 1 deletion regression-test/data/correctness_p0/test_and_or.out
Original file line number Diff line number Diff line change
@@ -1,77 +1,247 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !select3 --
-- !select1 --
1 \N true false true false true true
2 \N true false true false false false
3 \N true false true false false true
4 \N true false true false true false

-- !select3 --
false
false
false
false

-- !select3 --
false
false
false
false

-- !select3 --
true
true
true
true

-- !select3 --
true
true
true
true

-- !select3 --
\N
\N
false
false

-- !select3 --
false
false
false
false

-- !select3 --
false
true
true
true

-- !select3 --
\N
\N
\N
\N

-- !select3 --
false
false
true
true

-- !select3 --
false
false
false
true

-- !select3 --
false
false
true
true

-- !select3 --
false
false
true
true

-- !select3 --
false
false
false
false

-- !select3 --
\N
\N
\N
\N

-- !select3 --
true
true
true
true

-- !select3 --
true
true
true
true

-- !select3 --
false
false
true
true

-- !select3 --
\N
\N
\N
\N

-- !select3 --
false
true
true
true

-- !select3 --
false
false
false
true

-- !select3 --
false
false
false
true

-- !select3 --
false
false
true
true

-- !select1 --
false
false
false
false

-- !select2 --
false
false
false
false

-- !select3 --
true
true
true
true

-- !select4 --
true
true
true
true

-- !select5 --
false
true
true
true

-- !select6 --
false
false
true
true

-- !select7 --
false
false
false
false

-- !select8 --
\N
\N
\N
\N

-- !select9 --
false
false
true
true

-- !select10 --
false
false
false
false

-- !select11 --
\N
\N
\N
\N

-- !select12 --
\N
\N
\N
\N

-- !select13 --
\N
\N
\N
\N

-- !select14 --
\N
\N
\N
\N

-- !select15 --
false
false
false
true

-- !select16 --
false
false
true
true

-- !select17 --
false
false
true
true

-- !select18 --
false
false
false
false

31 changes: 27 additions & 4 deletions regression-test/suites/correctness_p0/test_and_or.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,34 @@ suite("test_and_or") {
);
"""

sql """ insert into test_and_or values(1,NULL,true,false,true,false,true,true)"""
sql """ insert into test_and_or values(1,NULL,true,false,true,false,true,true);"""
sql "insert into test_and_or values(2,NULL,true,false,true,false,false,false);"


qt_select3 """select * from test_and_or order by 1,2,3;"""
sql "insert into test_and_or values(3,NULL,true,false,true,false,false,true);"
sql "insert into test_and_or values(4,NULL,true,false,true,false,true,false);"
qt_select1 """select * from test_and_or order by 1,2,3;"""
qt_select3 """ select (k_false_not and non_nullable(k_false)) and (k_null or k_true) from test_and_or order by 1; """
qt_select3 """ select (k_null and k_false) and (k_null or k_true) from test_and_or order by 1; """
qt_select3 """ select (k_null or k_true) and (k_false_not or k_true_not) from test_and_or order by 1; """
qt_select3 """ select (k_true_not or k_false_not) and (k_null or k_true) from test_and_or order by 1; """
qt_select3 """ select (k_null or k_false) and (k_false_not or k_true_not and k_true_false_not) from test_and_or order by 1; """
qt_select3 """ select (k_null or k_false) and (k_false_not or k_true_not and k_false) from test_and_or order by 1; """
qt_select3 """ select (k_true_false_not or k_true_false) and (k_true_not or k_true) from test_and_or order by 1; """
qt_select3 """ select (k_null or k_false) and (k_false_not or k_true_not) from test_and_or order by 1; """
qt_select3 """ select (k_true_not and k_true_false_not or k_true_false) and (k_false_not or k_true_false_not) from test_and_or order by 1; """
qt_select3 """ select (k_true_false or k_false) and (k_false_not or k_true_false_not) from test_and_or order by 1; """
qt_select3 """ select (k_true_false_not and k_true_not) or (k_false and k_true) from test_and_or order by 1; """
qt_select3 """ select (k_true_false_not and k_true_not) or (k_false and k_true) from test_and_or order by 1; """
qt_select3 """ select (k_true_false and k_false) or (k_false_not and k_true_false_not) from test_and_or order by 1; """
qt_select3 """ select (k_false_not and k_true_not) or (k_null and k_true) from test_and_or order by 1; """
qt_select3 """ select (k_false_not and k_true or k_true_false_not) or (k_true_not and non_nullable(k_true)) from test_and_or order by 1; """
qt_select3 """ select (k_false_not and k_true_not or k_true_false_not) or (k_true_not and k_true) from test_and_or order by 1; """
qt_select3 """ select (k_true_false_not and k_true_not) or (k_false and k_true) from test_and_or order by 1; """
qt_select3 """ select (k_null and k_true) or (k_false_not and k_false) from test_and_or order by 1; """
qt_select3 """ select (k_false_not and k_true_not or k_true_false) or (k_true_not and k_true_false_not) from test_and_or order by 1; """
qt_select3 """ select (k_true_false and k_true_false_not) or (k_false_not and k_true_not or k_false) from test_and_or order by 1; """
qt_select3 """ select (k_true_false and k_true_false_not) or (k_false_not and k_true_not or k_false) from test_and_or order by 1; """
qt_select3 """ select (k_true_false and k_true_false_not) or (cast(id as boolean) and (k_true_false_not)) from test_and_or order by 1; """

qt_select1 """ select (k_false_not and k_false_not) and (k_null or k_true) from test_and_or order by 1;"""
qt_select2 """ select (k_null and k_false) and (k_null or k_true) from test_and_or order by 1;"""
qt_select3 """ select (k_null or k_true) and (k_false_not or k_true_not) from test_and_or order by 1;"""
Expand Down

0 comments on commit f4d1f8d

Please sign in to comment.