val DF1 = Seq(
(None, None, Some("alice"), Some(101)),
(None, None, Some("bob"), Some(231)),
(Some("alice"), Some(100), None, None),
(Some("bob"), Some(23), None, None)).
toDF("name","upload", "name1", "upload1")
DF1.withColumn("name", coalesce($"name", $"name1")).drop("name1").show
+-----+------+-------+
| name|upload|upload1|
+-----+------+-------+
|alice| null| 101|
| bob| null| 231|
|alice| 100| null|
| bob| 23| null|
+-----+------+-------+
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…