I am trying to find the spark SQL for the following oracle function
IIF(ISNULL(TYPE_CODE),'UNASSIGNED',TYPE_CODE)
I am trying to find the spark SQL for the following oracle function
IIF(ISNULL(TYPE_CODE),'UNASSIGNED',TYPE_CODE)
In scala :
import org.apache.spark.sql.{functions => f}
val new_df = df_name.withColumn("col_name",f.when(f.col("other_col_name").isNull(),TYPE_CODE)