https://pinot.apache.org/ logo
#general
Title
# general
d

Dharak Kharod

09/23/2020, 2:11 AM
Hi, I had a quick question on the multivalued columns, what is the expected behavior when a multivalued column is used as a group-by key or that is an invalid pattern and should not be used?
n

Neha Pawar

09/23/2020, 2:21 AM
the multi value column will get expanded. If you had column [a, b, c], and you group by that column, the result will have an entry separately for a and b and c
d

Dharak Kharod

09/23/2020, 2:24 AM
oh okay, thanks for the quick reply! A small followup, in this case the group value being returned will be as a string or a multivalued column, i mean is it
"a"
or
["a"]
n

Neha Pawar

09/23/2020, 2:25 AM
it’ll be “a”
d

Dharak Kharod

09/23/2020, 2:26 AM
got it, thanks for the info!
👍 1
1
b

Buchi Reddy

09/23/2020, 5:42 PM
FYI @Tim Mwangi
y

Yupeng Fu

09/24/2020, 7:41 PM
hey @Neha Pawar I’m curious why we decided to expand the columns?
This behavior is different from Presto’s, and may cause confusion to our users (who query pinot via presto)
for example, this query in presto
Copy code
select a, count(*)
from (select array[1,2,3] as a ) as t
group by a
returns
Copy code
[123], 1