You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "jaceklaskowski (via GitHub)" <gi...@apache.org> on 2023/03/27 09:16:01 UTC
[GitHub] [spark] jaceklaskowski commented on a diff in pull request #40553: [SPARK-39722] [SQL] getString API for Dataset
jaceklaskowski commented on code in PR #40553:
URL: https://github.com/apache/spark/pull/40553#discussion_r1149025286
##########
sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala:
##########
@@ -883,6 +883,129 @@ class Dataset[T] private[sql](
println(showString(numRows, truncate, vertical))
// scalastyle:on println
+ /**
+ * Gets top 20 rows of Dataset as string in a tabular form. Strings more than 20 characters
+ * will be truncated, and all cells will be aligned right.
+ *
+ * @group action
+ * @since 3.5.0
Review Comment:
nit: Why is this `3.5.0`?
##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/Dataset.scala:
##########
@@ -535,6 +535,159 @@ class Dataset[T] private[sql] (
}
}
+ /**
+ * Gets the Dataset as string in a tabular form. Strings more than 20 characters will be
+ * truncated, and all cells will be aligned right. For example:
+ * {{{
+ * year month AVG('Adj Close) MAX('Adj Close)
+ * 1980 12 0.503218 0.595103
+ * 1981 01 0.523289 0.570307
+ * 1982 02 0.436504 0.475256
+ * 1983 03 0.410516 0.442194
+ * 1984 04 0.450090 0.483521
+ * }}}
+ *
+ * @param numRows
+ * Number of rows to show
+ * @group action
+ * @since 3.4.0
Review Comment:
nit: Why is this `3.4.0` while the latter changes are marked as `3.5.0`?
--
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: reviews-unsubscribe@spark.apache.org
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