首页 > 解决方案 > 在 hive/impala 中将 int 数组转换为字符串

问题描述

我试图concat_ws(string delimiter, array<string>)解决这个 SO question中提供的解决方案。但是我收到一个错误:

Error while compiling statement: FAILED: ClassCastException null

下面的语句确实有效,但是除了数组列之外,您不能选择多于两列:

with tbl as (
  select transform(mycolumn, tb_name) using '/bin/cat' as (mycolumnstr, tb_name) 
  from mytable) 
select concat_ws('-', tb_name, mycolumnstr) from tbl;

标签: arrayshivehiveqlimpala

解决方案


推荐阅读