You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/03/15 19:12:04 UTC
[GitHub] [pinot] elonazoulay opened a new issue #8353: Provide a way to group by an entire multi value field
elonazoulay opened a new issue #8353:
URL: https://github.com/apache/pinot/issues/8353
Currently, Pinot explodes multi value columns included in grouping sets. This is desirable for many use cases but differs from how some other sql engines behave. Provide a way to group by an entire multi value field instead of exploding it, such as a transform function.
Here is an example to illustrate:
For a table with a multi value string array column and long column with the following values:
```
['hi', 'hello'], 3
['bye'], 4
['good', 'bye'], 2
```
And the query and results:
```
select string_array_col, count(*) from table group by string_array_col;
```
Results:
```
'hi', 1
'bye', 2
'good', 1
'hello', 1
```
Provide a transform function so that we can group by the entire array, for example:
```
select joinmv(string_array_col), count(*) from table group by joinmv(string_array_col)
['hi', 'hello'], 1
['bye'], 1
['good', 'bye'], 1
```
--
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@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] egalpin commented on issue #8353: Provide a way to group by an entire multi value field
Posted by GitBox <gi...@apache.org>.
egalpin commented on issue #8353:
URL: https://github.com/apache/pinot/issues/8353#issuecomment-1071971565
You might be able to achieve this behaviour today using Ingestion Transforms. If you had a transform which sorted (depending on whether order of values matters in your use case) the entities and join/concat them into one string, storing the result in another column, I think you could GROUP BY the new column and yield the behaviour you described.
Thoughts?
--
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@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] egalpin commented on issue #8353: Provide a way to group by an entire multi value field
Posted by GitBox <gi...@apache.org>.
egalpin commented on issue #8353:
URL: https://github.com/apache/pinot/issues/8353#issuecomment-1071971565
You might be able to achieve this behaviour today using Ingestion Transforms. If you had a transform which sorted (depending on whether order of values matters in your use case) the entities and join/concat them into one string, storing the result in another column, I think you could GROUP BY the new column and yield the behaviour you described.
Thoughts?
--
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@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org