SPRKSCL1159

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

Description

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

Input code

val result = stddev_samp("columnName")

Output code

/*EWI: SPRKSCL1159 => org.apache.spark.sql.functions.stddev_samp has a workaround, see documentation for more info*/
val result = stddev_samp("columnName")

Scenarios

This function has two overloads.

1. stddev_samp(e: Column)

Action: does not need any change.

2. stddev_samp(columnName: String)

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

val result = stddev_samp(col("columnName"))

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.

#332: [SIT-1562] SQL Readiness

Change request updated