Skip to content

Commit

Permalink
improve sqllogictests for case_column_or_null
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangli20 committed Dec 24, 2024
1 parent 86b4a41 commit ba22ac6
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions datafusion/sqllogictest/test_files/case.slt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,28 @@ NULL
NULL
NULL

# column or implicit null (no nulls)
query I
SELECT CASE WHEN NULLIF(NVL(a, 0) >= 0, FALSE) THEN b END FROM foo
----
2
4
6
NULL
NULL
7

# column or implicit null (all nulls)
query I
SELECT CASE WHEN NULLIF(NVL(a, 0) >= 0, TRUE) THEN b END FROM foo
----
NULL
NULL
NULL
NULL
NULL
NULL

# scalar or scalar (string)
query T
SELECT CASE WHEN a > 2 THEN 'even' ELSE 'odd' END FROM foo
Expand Down

0 comments on commit ba22ac6

Please sign in to comment.