SPRKSCL1117

org.apache.spark.sql.functions.translate has a workaround.

Description

This issue appears when the tool detects the usage of org.apache.spark.sql.functions.translate which has a workaround.

Input code

val result = translate(someColumn, "matchingString", "replaceString")

Output code

/*EWI: SPRKSCL1117 => org.apache.spark.sql.functions.translate has a workaround, see documentation for more info*/
val result = translate(someColumn, "matchingString", "replaceString")

Scenarios

There only one scenario.

1. translate(src: Column, matchingString: String, replaceString: String)

Action: convert the second and third param to Column type using the com.snowflake.snowpark.functions.col function. For example:

val result = translate(someColumn, col("matchingString"), col("replaceString"))

Recommendation

  • For more support, you can email us at snowconvert-info@snowflake.com. If you have a contract for support with Snowflake, reach out to your sales engineer and they can direct your support needs.