xinrong-meng commented on code in PR #47884:
URL: https://github.com/apache/spark/pull/47884#discussion_r1735506986
##########
sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala:
##########
@@ -1191,6 +1191,30 @@ class Dataset[T] private[sql](
valueColumnName: String): DataFrame =
unpivot(ids.toArray, variableColumnName, valueColumnName)
+ /** @inheritdoc */
+ def transpose(indexColumn: Column): DataFrame = withPlan {
+ if (this.columns.isEmpty) {
+ LocalRelation()
+ } else {
+ UnresolvedTranspose(
+ indexColumn.named,
+ logicalPlan
+ )
+ }
+ }
+
+ /** @inheritdoc */
+ def transpose(): DataFrame = withPlan {
Review Comment:
Good point! Moving to ResolveTranspose benefits Spark Connect and provides a
more readable plan.
Would you please review
[b9a0c80](https://github.com/apache/spark/pull/47884/commits/b9a0c80d47680c54db50369a25e90b56f8f6333c)
for the change?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]