DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Web TestEngine demo

Exit VCEDump DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Databricks Certified Associate Developer for Apache Spark
Question 80 of 82
0% complete
Q80 Single choice

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:

Question 80 diagram

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?

Sign in to mark questions

Sign in to save marked questions and return to this demo.

Sign in