Below is the dataframe from which I need to derive the output.
|A|B|C|E|F|
+---------+
|1|2|3|5|6|
+---------+
Dataset<Row> set = spark.sql("select A as one, B as two, C as three ,D as four, E as five, F as six from input");
I need to skip the column 'D' if it is not present and move on to the other column(i.e) E.
If any of the column is not present then should print null and move on to the other column assignment.