alamb commented on code in PR #14349:
URL: https://github.com/apache/datafusion/pull/14349#discussion_r1936101942
##########
datafusion/sqllogictest/test_files/case.slt:
##########
@@ -289,12 +289,22 @@ query B
select case when a=1 then false end from foo;
----
false
-false
-false
-false
-false
-false
+NULL
+NULL
+NULL
+NULL
+NULL
+query IBB
Review Comment:
Here is the postgres results (same as this PR)
```sql
postgres=# SELECT c,
CASE WHEN c > 0 THEN true END AS c1,
CASE WHEN c > 0 THEN true ELSE false END AS c2
FROM (VALUES (1), (0), (-1), (NULL)) AS t(c);
c | c1 | c2
----+----+----
1 | t | t
0 | | f
-1 | | f
| | f
(4 rows)
```
##########
datafusion/sqllogictest/test_files/case.slt:
##########
@@ -289,12 +289,22 @@ query B
select case when a=1 then false end from foo;
----
false
Review Comment:
I verified the new results is consistent with postgres
```sql
postgres=# insert into foo values (1, 2), (3, 4), (5, 6), (null, null), (6,
null), (null, 7);
INSERT 0 6
postgres=# select case when a=1 then false end from foo;
case
------
f
(6 rows)
postgres=#
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]