-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
bug: GROUP_CONCAT() function return result set error #938
Labels
A-bug
Something isn't working
Comments
using mysql> SELECT group_concat(d1 ORDER BY d1) FROM test;
+------------------------------+
| group_concat(d1 ORDER BY d1) |
+------------------------------+
| 1234,56789012,1234567890123 |
+------------------------------+
1 row in set (0.00 sec) |
bool Query::IsAggregationOverFieldItem(Item *item) {
return IsAggregationItem(item) && IsFieldItem(((Item_sum *)item)->get_arg(0));
} The type of item is Tianmu::core::Query::IsAggregationOverFieldItem (item=0x0) at /home/lihao/workshop/stonedb/storage/tianmu/core/query.cpp:190
190 bool Query::IsAggregationOverFieldItem(Item *item) {
(gdb) n
191 return IsAggregationItem(item) && IsFieldItem(((Item_sum *)item)->get_arg(0));
(gdb) p IsAggregationItem(item)
$82 = true
(gdb) p ((Item_sum *)item)->get_arg(0)
$83 = (Item_direct_view_ref *) 0x7fa3a0065c60
(gdb) p *((Item_sum *)item)->get_arg(0)
$84 = (Item_direct_view_ref) {
<Item_direct_ref> = {
<Item_ref> = {
<Item_ident> = {
<Item> = { |
This was referenced Nov 29, 2022
mergify bot
pushed a commit
that referenced
this issue
Nov 29, 2022
[summary] To fix up the item which refs to subselect leads `GROUP_CONCAT` wrong result. The type of item is `REF_ITEM` and therefore, we can not recoginize its type.
konghaiya
pushed a commit
to konghaiya/stonedb
that referenced
this issue
Mar 7, 2023
…tom#938) [summary] To fix up the item which refs to subselect leads `GROUP_CONCAT` wrong result. The type of item is `REF_ITEM` and therefore, we can not recoginize its type.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you read the Contributing Guidelines on issues?
Please confirm if bug report does NOT exists already ?
Describe the problem
GROUP_CONCAT() function, by default, the values of group are separated by (, ) operator,
But here, the result set did not separate by the comma (, ).
The wrong result is as follows:
Expected behavior
How To Reproduce
Environment
Are you interested in submitting a PR to solve the problem?
The text was updated successfully, but these errors were encountered: