fangchenli commented on code in PR #54014:
URL: https://github.com/apache/spark/pull/54014#discussion_r2752391815
##########
sql/core/src/main/scala/org/apache/spark/sql/classic/Dataset.scala:
##########
@@ -1198,6 +1198,11 @@ class Dataset[T] private[sql](
Except(logicalPlan, other.logicalPlan, isAll = true)
}
+ /** @inheritdoc */
+ def zipWithIndex(indexColName: String): DataFrame = {
+ select(col("*"), Column(DistributedSequenceID()).alias(indexColName))
Review Comment:
> how does it fail for duplicated col names?
The current implementation doesn't fail. If we want it to fail on a
duplicate column name, should I add the check eagerly here? I don't see similar
checks here in other methods.
--
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]