Skip to content

Commit 55ba739

Browse files
test: Add assertion for mixed result types in CASE expression
1 parent 5460a26 commit 55ba739

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

integration-test/src/test/java/org/apache/iotdb/relational/it/db/it/IoTDBCaseWhenThenTableIT.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ public void testKind1OutputTypeRestrict() {
159159
"select case when s1<=0 then true else 22 end from table1",
160160
"701: All CASE results must be the same type or coercible to a common type. Cannot find common type between BOOLEAN and INT32, all types (without duplicates): [BOOLEAN, INT32]",
161161
DATABASE);
162+
tableAssertTestFail(
163+
"select case when s1<=0 then 0 when s1>1 then null end from table1",
164+
"701: All result types must be the same:",
165+
DATABASE);
162166

163167
// TEXT and other types cannot exist at the same time
164168
retArray = new String[] {"good,", "bad,", "okok,", "okok,"};

0 commit comments

Comments
 (0)