SPRKSCL1134

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

Description

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

Input code

val result = log(5, "columnName1")

Output code

/*EWI: SPRKSCL1134 => org.apache.spark.sql.functions.log has a workaround, see documentation for more info*/
val result = log(5, "columnName1")

Scenarios

This function has four overloads.

1. log(e: Column)

Action: does not need any change, becuse is not supported by Snowpark.

2. log(columnName: String)

Action: does not need any change, becuse is not supported by Snowpark.

3. log(base: Double, a: Column)

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

val result = log(col(5), someColumn)

4. log(base: Double, columnName: String)

Action: convert the params to Column type using the com.snowflake.snowpark.functions.col function. For example:

val result = log(col(5), col("columnName1"))

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.