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
866 stars 141 forks source link

bug: expected supported SQL sytax not support (UNION ALL, LIKE) #1943

Open zhenglin-charlie-li opened 1 year ago

zhenglin-charlie-li commented 1 year ago

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

Describe the problem

According to https://stonedb.io/docs/developer-guide/statements-for-queries, StoneDB support UNION ALL and LIKE.

But when execting the following command, StoneDB return "ERROR 6 (HY000): The query includes syntax that is not supported by the storage engine. Either restructure the query with supported syntax, or enable the MySQL core::Query Path in config file to execute the query with reduced performance."

image

The command:

SELECT *
FROM t0
WHERE ((t0.c0) LIKE (t0.c0))
UNION ALL
SELECT *
FROM t0
WHERE (NOT ((t0.c0) LIKE (t0.c0)))
UNION ALL
SELECT *
FROM t0
WHERE ((((t0.c0) LIKE (t0.c0))) IS NULL);

Expected behavior

Such query is supported

How To Reproduce

CREATE TABLE t0
(
    c0 INT
);

SELECT *
FROM t0
WHERE ((t0.c0) LIKE (t0.c0))
UNION ALL
SELECT *
FROM t0
WHERE (NOT ((t0.c0) LIKE (t0.c0)))
UNION ALL
SELECT *
FROM t0
WHERE ((((t0.c0) LIKE (t0.c0))) IS NULL);

Environment

Docker v1.0.4

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