I am trying to replace a column in Dataset with value Y if it contains X.
import org.apache.spark.sql.functions.*;
public static void main(String[] args) {
Dataset<Row> DS;//already created dataset
DS = DS.withColumn(column,when(col(column) === "X", "Y"));
}
It is giving me compilation error of The method col(String) undefined in Eclipse. I dont know what I am doing wrong. Please help.