Hi, I had a quick question on the multivalued colu...
# general
d
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
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
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
it’ll be “a”
d
got it, thanks for the info!
👍 1
1
b
FYI @Tim Mwangi
y
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