【发布时间】:2017-11-17 07:13:34
【问题描述】:
select * from cancel where deduction_percentage like '%100% cancel fee%';
SemanticException [错误 10014]:第 1:27 行错误的参数“%100% 取消费用%”:类 org.apache.hadoop.hive.ql.udf.UDF 没有匹配方法与(数组,字符串)类似.可能的选择:FUNC(string, string)
【问题讨论】:
-
异常表明
deduction_percentage是一个数组。like适用于字符串。使用concat_ws或使用 array_contains(Array, value) 函数连接数组。或者使用[]比较数组元素