I just moved some of my spark codes from 1.6.0 to 2.2.0 and discovered that some functions in org.apache.spark.sql.functions._ are being replaced/renamed.
To name a few, see below
1) rowNumber() is replaced by row_number()
import org.apache.spark.sql.functions._ /** * @group window_funcs * @deprecated As of 1.6.0, replaced by `row_number`. This will be removed in Spark 2.0. */ @deprecated("Use row_number. This will be removed in Spark 2.0.", "1.6.0") def rowNumber(): Column = row_number()
2) isNaN is replaced by isnan
/** * @group normal_funcs * @deprecated As of 1.6.0, replaced by `isnan`. This will be removed in Spark 2.0. */ @deprecated("Use isnan. This will be removed in Spark 2.0.", "1.6.0") def isNaN(e: Column): Column = isnan(e)
3) inputFileName() is replaced by input_file_name
/** * @group normal_funcs * @deprecated As of 1.6.0, replaced by `input_file_name`. This will be removed in Spark 2.0. */ @deprecated("Use input_file_name. This will be removed in Spark 2.0.", "1.6.0") def inputFileName(): Column = input_file_name()
To get the full list of all the replaced/renamed functions, refer to this code
https://github.com/apache/spark/blob/branch-1.6/sql/core/src/main/scala/org/apache/spark/sql/functions.scala