i am trying to add values of two column after converting from string to int using withcolumn in spark sql.
withColumn("totalDowntimetime",("zenerTime").cast(int)+("avalancheTime").cast(int)).show(truncate = false)
but it is throwing error as "
Error:(36, 44) type mismatch;
found : String("zenerTime")
required: org.apache.spark.sql.Column
withColumn("totalDowntimetime",("zenerTime").cast(int)+("avalancheTime").cast(int)).show(truncate = false)
Very Much Appreciate your suggestion