You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/11/05 04:46:27 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #30257: [SPARK-33351][SQL] WithColumn should add a column in specific position

HyukjinKwon commented on a change in pull request #30257:
URL: https://github.com/apache/spark/pull/30257#discussion_r517789970



##########
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:
       Not sure. I would just simply select.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org