Hive check elements in array
There are some collection functions in Hive `(See collection functions here : https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF ) which can use here.
You can use the array_contains(Array<T>, value)
function to check if item 1 is present and the size(Array<T>)
function to make sure the length is 1. If both conditions are satisfied, you will get the desired output.