stoneatom / stonedb

StoneDB is an Open-Source MySQL HTAP and MySQL-Native DataBase for OLTP, Real-Time Analytics, a counterpart of MySQLHeatWave. (https://stonedb.io)
https://stonedb.io/
GNU General Public License v2.0
857 stars 140 forks source link

bug: query result wrong: CASE WHEN THEN ELSE #1950

Open ZhengLin-Li opened 11 months ago

ZhengLin-Li commented 11 months ago

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

Describe the problem

The query result does not meet expectation

StoneDB V1.0.4 Result

image

MySQL 5.7 Result

image

Expected behavior

No response

How To Reproduce

CREATE TABLE t0(c0 INT NULL);
INSERT INTO t0(c0) VALUES (DEFAULT);
SELECT * FROM t0 WHERE (CASE (t0.c0 IN (t0.c0)) WHEN TRUE THEN 'TRUE' ELSE 'FALSE' END );

Environment

Docker v1.0.4

Are you interested in submitting a PR to solve the problem?