Yikun commented on a change in pull request #32431:
URL: https://github.com/apache/spark/pull/32431#discussion_r627251519
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -2398,8 +2398,14 @@ class Dataset[T] private[sql](
/**
* Returns a new Dataset by adding columns or replacing the existing columns
that has
* the same names.
+ *
+ * `column`'s expression in `cols` must only refer to attributes supplied by
this Dataset.
+ * It is an error to add columns that refers to some other Dataset.
+ *
+ * @group untypedrel
+ * @since 3.2.0
*/
- private[spark] def withColumns(colNames: Seq[String], cols: Seq[Column]):
DataFrame = {
+ def withColumns(colNames: Seq[String], cols: Seq[Column]): DataFrame = {
Review comment:
I'd like to add Map like `colsMap`, it's more readable, I will do it in
next PR.
--
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]