Hi, I am adding a new column and renaming it at same time but the renaming doesnt have any effect.
dffiltered = > dffiltered.unionAll(dfresult.withColumn("Col1",lit("value1").withColumn("Col2",lit("value2")).cast("int")).withColumn("Col3",lit("values3")).withColumnRenamed("Col1","Col1Rename").drop("Col1") Can anybody help me pointing out my mistake ? Thanks, Divya