Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.11.0
Description
Steps to Reproduce
Run the following query via sqlline:
select case when expr$0 = 3 then expr$0 else expr$1 end, case when expr$0 = 1 then expr$0 else expr$1 end from (values(1, 2));
Actual Results
+---------+---------+ | EXPR$0 | EXPR$1 | +---------+---------+ | 2 | 2 | +---------+---------+
Expected Results
+---------+---------+ | EXPR$0 | EXPR$1 | +---------+---------+ | 2 | 1 | +---------+---------+
Note, that changing order of CASE statements fixes the issue. The following query yields correct results:
select case when expr$0 = 1 then expr$0 else expr$1 end, case when expr$0 = 3 then expr$0 else expr$1 end from (values(1, 2));
Attachments
Issue Links
- is related to
-
DRILL-5683 Incorrect query result when query uses NOT(IS NOT NULL) expression
- Resolved
- relates to
-
DRILL-5581 Query with CASE statement returns wrong results
- Resolved
-
DRILL-6722 Query from parquet with case-then and arithmetic operation returns a wrong result
- Resolved
- links to