You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2023/01/12 15:08:36 UTC
[GitHub] [doris] lexluo09 opened a new issue, #15884: [Enhancement] Array types support the "group by" operation
lexluo09 opened a new issue, #15884:
URL: https://github.com/apache/doris/issues/15884
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
### Description
1. Background
Now, The Array types not support the "group by" operation. We need to explode the Array type using "explode" and then perform the group by operation
2. Purpose
We expect to group by arrays directly. It looks like this.
The data :
id tag1
1 [A,B,C]
2 [C,B]
3 [A,C]
SQL :
SELECT tag1, count(1) FROM table GROUP BY tag1
Result :
A , 2
B , 2
C , 3
### Solution
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] luzhijing commented on issue #15884: [Enhancement] Array types support the "group by" operation
Posted by "luzhijing (via GitHub)" <gi...@apache.org>.
luzhijing commented on issue #15884:
URL: https://github.com/apache/doris/issues/15884#issuecomment-1437996415
@xiaokang
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] raisonqyc commented on issue #15884: [Enhancement] Array types support the "group by" operation
Posted by GitBox <gi...@apache.org>.
raisonqyc commented on issue #15884:
URL: https://github.com/apache/doris/issues/15884#issuecomment-1381263192
You can try the explode function:
https://doris.apache.org/docs/dev/sql-manual/sql-functions/table-functions/explode/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] lexluo09 commented on issue #15884: [Enhancement] Array types support the "group by" operation
Posted by GitBox <gi...@apache.org>.
lexluo09 commented on issue #15884:
URL: https://github.com/apache/doris/issues/15884#issuecomment-1381276170
Thank you very much for your advice. We need to use "group by" for single values and "export" for multiple values, which is not very convenient.
In this way, multi-value and single-value are unified, and group by is unified for each field.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org