A Spark developer wants to improve the performance of an existing PySpark UDF that runs a hash function that is not available in the standard Spark functions library. The existing UDF code is: The developer wants to replace this existing UDF with a Pandas UDF to improve performance. The developer changes the definition of shake_256_udf to this: shake_256_udf = sf.pandas_udf(shake_256, StringType()) However, the developer receives the error: [UNSUPPORTED_SIGNATURE] Unsupported signature: (raw: str) –> str. What should the signature of the shake_256() function be changed to in order to fix this error?
Select one answer.
Purchase Full Access to view answer options & explanation
The first 118 questions in this bank are completely free. Unlock Full Access on the exam page to view all answer choices, verified answers, explanations, and community discussions for all 392 questions.