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

support GROUP_CONCAT(ORDER BY) #6838

Closed
WangXiangUSTC opened this issue Jun 14, 2018 · 0 comments · Fixed by #16591
Closed

support GROUP_CONCAT(ORDER BY) #6838

WangXiangUSTC opened this issue Jun 14, 2018 · 0 comments · Fixed by #16591
Assignees
Labels
feature/accepted This feature request is accepted by product managers sig/execution SIG execution sig/planner SIG: Planner type/feature-request Categorizes issue or PR as related to a new feature.

Comments

@WangXiangUSTC
Copy link
Contributor

WangXiangUSTC commented Jun 14, 2018

this is the data in my table:

mysql> select * from test;
+------+------+
| id        | name |
+------+------+
|    2      | bcd   |
|    1      | abc    |
+------+------+
2 rows in set (0.20 sec)

And then I execute this sql:

mysql> SELECT GROUP_CONCAT(id ORDER BY id ASC) AS tmp FROM `test1`.`test`;
+-----------+
| tmp             |
+-----------+
| 2,1               |
+-----------+
1 row in set (0.00 sec)

But I want to see:

+-----------+
| tmp             |
+-----------+
| 1,2               |
+-----------+

it seems that tidb don't support ORDER BY in GROUP_CONCAT now.

the tidb version:

mysql> select tidb_version();
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                                     |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v2.1.0-alpha-45-g390e08b
Git Commit Hash: 390e08bb87cf98d6efe15ccf2882cdcdbc17e252
Git Branch: master
UTC Build Time: 2018-06-12 11:55:43
GoVersion: go version go1.10.2 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-c4133d3ef0f099f8716a916c198390b26293ec00
@lysu lysu added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Dec 29, 2018
@zz-jason zz-jason added type/feature-request Categorizes issue or PR as related to a new feature. and removed help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/compatibility labels Mar 30, 2020
@zz-jason zz-jason added sig/execution SIG execution sig/planner SIG: Planner labels Mar 30, 2020
@zz-jason zz-jason changed the title GROUP_CONCAT don't support ORDER BY support GROUP_CONCAT(ORDER BY) Mar 30, 2020
@SunRunAway SunRunAway self-assigned this Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/accepted This feature request is accepted by product managers sig/execution SIG execution sig/planner SIG: Planner type/feature-request Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants