SPRKSCL1160
org.apache.spark.sql.functions.sum
This issue code has been deprecated since Spark Conversion Core 4.1.0
Message: org.apache.spark.sql.functions.sum 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.sum function, which has a workaround.
Scenario
Input
Below is an example of the org.apache.spark.sql.functions.sum
function that generates this EWI. In this example, the sum
function is used to calculate the sum of selected column.
Output
The SMA adds the EWI SPRKSCL1160
to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Recommended fix
Snowpark has an equivalent sum function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Additional recommendations
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
Last updated