arrays - 在 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;
解决方案
推荐阅读
- javascript - 根据数据库属性从 req.body 中动态选择值
- node.js - Node.js Jasmine helpers onComplete
- c - C qsort不对多维数组中的最后一项进行排序
- amazon-ec2 - Issues expanding a PVC in Kubernetes 1.9.9 / Kops 1.9.2 on AWS EC2 using allowVolumeExpansion
- android - How to set counter value in the application laucher icon in Oreo?
- c# - WPF MVVM 在代码中绑定动态控件并传入View
- c# - C# 花括号格式化 Visual Studio 2017
- python - Python multiprocessing.Pool 使用的 CPU 比允许的多
- django - Django - 在单个视图中添加、删除和更新模型
- powershell - 使用扩展字符串作为 Powershell 函数参数