stonedb
stonedb copied to clipboard
bug: Support Having clause failed.
Have you read the Contributing Guidelines on issues?
- [X] I have read the Contributing Guidelines on issues.
Please confirm if bug report does NOT exists already ?
- [X] I confirm there is no existing issue for this
Describe the problem
We try to run TPC-Q16 variant as following:
select
p_brand,
p_type,
p_size,
ps_suppkey
from
partsupp,
part
where
p_partkey = ps_partkey and p_brand = 'Brand#13' and p_type ='STANDARD BURNISHED TIN'
having p_size = 1
order by
p_brand,
p_type,
p_size,
ps_suppkey;
it can run on mysql but failed on stonedb. Therefore, we should to support this syntax as mysqld doese.
the output of stonedb is listed as following:
-> ps_suppkey;
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.
the output of mysql is listed as following:
-> ps_suppkey;
+----------+------------------------+--------+------------+
| p_brand | p_type | p_size | ps_suppkey |
+----------+------------------------+--------+------------+
| Brand#13 | STANDARD BURNISHED TIN | 1 | 138 |
| Brand#13 | STANDARD BURNISHED TIN | 1 | 397 |
| Brand#13 | STANDARD BURNISHED TIN | 1 | 656 |
| Brand#13 | STANDARD BURNISHED TIN | 1 | 915 |
+----------+------------------------+--------+------------+
Expected behavior
No response
How To Reproduce
To run the statement:
select
p_brand,
p_type,
p_size,
ps_suppkey
from
partsupp,
part
where
p_partkey = ps_partkey and p_brand = 'Brand#13' and p_type ='STANDARD BURNISHED TIN'
having p_size = 1
order by
p_brand,
p_type,
p_size,
ps_suppkey;
Environment
No response
Are you interested in submitting a PR to solve the problem?
- [ ] Yes, I will!