amaliujia commented on code in PR #40070:
URL: https://github.com/apache/spark/pull/40070#discussion_r1110375466
##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/Dataset.scala:
##########
@@ -2065,6 +2065,15 @@ class Dataset[T] private[sql] (val session:
SparkSession, private[sql] val plan:
collectResult().iterator.asInstanceOf[java.util.Iterator[T]]
}
+ /**
+ * Returns the number of rows in the Dataset.
+ * @group action
+ * @since 3.4.0
+ */
+ def count(): Long = {
+ groupBy().count().collect().head.getLong(0)
Review Comment:
In my local branch that I rebased today, there is no this API.
--
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]