С некоторыми ярлыками:
import org.apache.spark.sql.functions._
val df = Seq(ABCDEF(3, 6, 26, 0, 7, 2), ABCDEF(1, 14, 3, 21, 9, 1)).toDF
df.show
/*
+---+---+---+---+---+---+
| A| B| C| D| E| F|
+---+---+---+---+---+---+
| 3| 6| 26| 0| 7| 2|
| 1| 14| 3| 21| 9| 1|
+---+---+---+---+---+---+
*/
df.withColumn("G", 'E * 'F).sort(-'G).show
/*
+---+---+---+---+---+---+---+
| A| B| C| D| E| F| G|
+---+---+---+---+---+---+---+
| 3| 6| 26| 0| 7| 2| 14|
| 1| 14| 3| 21| 9| 1| 9|
+---+---+---+---+---+---+---+
*/