title: Hive SQL, querying a column of arrays using where statement
body: <p>I'm just curious about filtering my query with a where statement in a table with array column</p>
  
  <p>So for example, I have a column of username and usertype, then each username might have more than one type</p>
  
  <p>So when I use </p>
  
  <pre><code> select username, collect_set(usertype) as type from table group by username
  </code></pre>
  
  <p>Then I will have something like: user1,[1,2,3],   user2,[3,4,5] and so on. The problem is when I want to filter the result using "where usertype = [3,4,5]". I am not sure how to construct an array to do the filtering and right now I have been using "where usertype[0] = 3 and usertype[1] = 4 " and so on. Anyone has any advise or idea on this matter?</p>
  
  <p>Thanks</p>