如何在impala或hive上读取复杂类型数组< string>?

sshcrbum  于 2021-05-29  发布在  Hadoop
关注(0)|答案(1)|浏览(768)

我试着读Hive上的复杂类型

dog.owners (array<string>)

使用以下查询

select dog_id, concat_ws(',',collect_set(owners)) as owners 
from dog 
group by dog_id

但我收到以下错误 Argument 2 of function CONCAT_WS must be "string or array<string>", but "array<array<string>>" was found. 看起来数据类型不匹配。我试图创建列所有者作为 array<array<string>> 但我还是犯了同样的错误。有没有办法读Hive或 Impala 的专栏?

nafvub8i

nafvub8i1#

select dog_id, do.* from dog, dog.owners as do

相关问题