SPRKPY1035

pyspark.sql.functions.reverse has a workaround

Description

This issue appears when the tool detects the usage of pyspark.sql.functions.reverse which has a workaround.

Input code:

df.select(reverse(col))
df.select(reverse("colName"))

Output code:

#EWI: SPRKPY1035 => pyspark.sql.functions.reverse has a workaround, see documentation for more info
df.select(reverse(col))
#EWI: SPRKPY1035 => pyspark.sql.functions.reverse has a workaround, see documentation for more info
df.select(reverse("colName"))

Scenario

reverse(col: ColumnOrName)

Action: Import snowpark_extensions package, which contains a helper for reverse function.

import snowpark_extensions
df.select(call_builtin("REVERSE", col)))

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.

Last updated