
Ultimate access to all questions.
In a scenario where you are working with a DataFrame 'df_employees' that includes columns 'employee_id', 'name', 'department', and 'salary', your task is to transform the 'employee_id' column, which contains arrays of integers, into a single column with all the integers using Spark SQL. Considering the need for efficiency and correctness, which of the following queries best accomplishes this task? Choose the best option._
A
SELECT flatten(employee_id) as employee_ids FROM df_employees_
B
SELECT explode(employee_id) as employee_ids FROM df_employees_
C
SELECT employee_id, explode(employee_id) as employee_ids FROM df_employees
D
SELECT employee_id, flatten(employee_id) as employee_ids FROM df_employees
E
Both A and D are correct but serve different purposes