Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在一个数组函数中搜索配置单元中的特定值。
我有一个为每个事件创建一行的表。我曾经collect_set(event_id)把桌子卷到人的水平。我现在需要搜索数组以将用户分为不同的类别。我尝试使用 case when 语句,find_in_set但是in_file这些函数都不适用于数组。
collect_set(event_id)
find_in_set
in_file
有任何想法吗?我可以将数组转换为字符串吗?理想情况下,我会group_concat在 SQL 中使用一个函数 - 但 hive 不支持它
group_concat
ARRAY_CONTAINS(events, search_param)search_param如果在事件数组中找到,将返回一个布尔值。
ARRAY_CONTAINS(events, search_param)
search_param
它在 Hive 0.7.1 和可能的更早版本中可用。