SPRKSCL1129
org.apache.spark.sql.functions.floor
Message: org.apache.spark.sql.functions.floor 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.floor function, which has a workaround.
Scenario
Input
Below is an example of the org.apache.spark.sql.functions.floor
function, first used with a column name as an argument, then with a column object and finally with two column objects.
Output
The SMA adds the EWI SPRKSCL1129
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 floor 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.
For the overload that receives a column object and a scale, you can use the callBuiltin function to invoke the Snowflake builtin FLOOR function. To use it, you should pass the string "floor" as the first argument, the column as the second argument and the scale as the third argument.
Additional recommendations
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
Last updated