I have created spark dataframe using scala, here is sample data
emp_id|result
1000 | [true,true,true]
1001 | [true,false,true]
1002 | [true,true,true]
result column is array<boolean>
I would like to generate final dataframe to compare the all values with result column for a given value
If given value is true, then expecting out come should be
emp_id|result | output
1000 | [true,true,true] | true
1001 | [true,false,true]| false
1002 | [true,true,true] | true
what is the better approach to achieve this using spark dataframe using scala.
I appreciate your help on this.