SPRKSCL1134
org.apache.spark.sql.functions.log
Message: org.apache.spark.sql.functions.log has a workaround, see documentation for more info
Category: Warning
Description
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.log function, which has a workaround.
Scenario
Input
Below is an example of the org.apache.spark.sql.functions.log
function that generates this EWI.
Output
The SMA adds the EWI SPRKSCL1134
to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Recommended fix
Below are the different workarounds for all the overloads of the log
function.
1. def log(base: Double, columnName: String): Column
You can convert the base into a column object using the com.snowflake.snowpark.functions.lit function and convert the column name into a column object using the com.snowflake.snowpark.functions.col function.
2. def log(base: Double, a: Column): Column
You can convert the base into a column object using the com.snowflake.snowpark.functions.lit function.
3.def log(columnName: String): Column
You can pass lit(Math.E)
as the first argument and convert the column name into a column object using the com.snowflake.snowpark.functions.col function and pass it as the second argument.
4. def log(e: Column): Column
You can pass lit(Math.E)
as the first argument and the column object as the second argument.
Additional recommendations
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
Last updated