我有一張桌子。其中一列是array<string>
。我嘗試在該表上運行查詢,然後將數據加載到文件中。在配置單元中使用數組和集合
這是查詢
Select concat(key, '|'
, code, '|'
, round(sum(amt), 4), '|'
, count(*)
, collect_set(comment))
from test_agg
where TIME_KEY = '2017-02-19'
group by key, code;
但得到一個錯誤
FAILED: UDFArgumentTypeException Only primitive type arguments are accepted but array<string> was passed as parameter 1.
我明白,我不能傳遞功能的array<string>
,但我能做些什麼?
comment
是array<string>
類型的列這是我如何運行它。
hive -f CALC_FILE.sql > 20170220.txt
附: - 獲得一個快速的好答案的最好方法是提供'show create table'和一個數據樣本。 –