Ultimate access to all questions.
The following code block contains an error. It is intended to create and register a SQL UDF named "ASSESS_PERFORMANCE" using the Scala function assessPerformance()
and apply it to the column customerSatisfaction
in the table stores
. Identify the error.
Code block:
spark.udf.register("ASSESS_PERFORMANCE", assessPerformance)
spark.sql("SELECT customerSatisfaction, ASSESS_PERFORMANCE(customerSatisfaction) AS result FROM stores")