title: Hive: How to check if values of one array are present in another?
body: <p>I have two arrays like this , which are being returned from a UDF I created:</p>
  
  <p>array A - [P908,S57,A65]
  array B - [P908,S57]</p>
  
  <p>I need to check if elements of array A are present in array B, or elements of array B are present in array A using hive queries.</p>
  
  <p>I am stuck here. Could anyone suggest a way?</p>
  
  <p>Can I also return some other data type from the UDF in place of array to make the comparison easier?</p>