For example, the intersection
select intersect(array("A","B"), array("B","C"))
should return
["B"]
and the union
select union(array("A","B"), array("B","C"))
should return
["A","B","C"]
What's the best way to make this in Hive? I have checked the hive documentation, but cannot find any relevant information to do this.