Karl-WangSK commented on a change in pull request #30257:
URL: https://github.com/apache/spark/pull/30257#discussion_r517802225
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -2387,11 +2387,19 @@ class Dataset[T] private[sql](
*/
def withColumn(colName: String, col: Column): DataFrame =
withColumns(Seq(colName), Seq(col))
+ /**
+ * Returns a new Dataset by adding a column at specific position or
replacing the
+ * existing column that has the same name.
+ */
+ def withColumn(colName: String, col: Column, pos: Int): DataFrame =
Review comment:
If use select, for users, which means they should adjust the order of
the cols.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]