Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

case when process null input in predicate cause a wrong result #8863

Closed
stdpain opened this issue Jul 18, 2022 · 1 comment · Fixed by #8869
Closed

case when process null input in predicate cause a wrong result #8863

stdpain opened this issue Jul 18, 2022 · 1 comment · Fixed by #8869
Assignees
Labels
type/bug Something isn't working

Comments

@stdpain
Copy link
Contributor

stdpain commented Jul 18, 2022

Steps to reproduce the behavior (Required)

CREATE TABLE `reproduce_null2` (
  `v1` varchar(255) NULL COMMENT "",
  `v2` varchar(255) NULL COMMENT ""
) ENGINE=OLAP 
UNIQUE KEY(`v1`)
COMMENT "OLAP"
DISTRIBUTED BY HASH(`v1`) BUCKETS 10 
PROPERTIES (
"replication_num" = "1",
"in_memory" = "false",
"storage_format" = "DEFAULT",
"enable_persistent_index" = "false"
);

 insert into reproduce_null2 values (null, null); 
 analyze full table reproduce_null2;
 -- make sure execute multi times
 select count(*) from reproduce_null2 where case when v2 is null then true else false end;

Expected behavior (Required)

mysql> select count(*) from reproduce_null2 where case when v2 is null then true else false end;
+----------+
| count(*) |
+----------+
|        1 |
+----------+
1 row in set (0.02 sec)

Real behavior (Required)

mysql> select count(*) from reproduce_null2 where case when v2 is null then true else false end;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.02 sec)

StarRocks version (Required)

  • 2.3.0-rc02
@stdpain
Copy link
Contributor Author

stdpain commented Sep 22, 2022

known failed 2.2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
2 participants