You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "peter-toth (via GitHub)" <gi...@apache.org> on 2023/04/13 14:07:48 UTC
[GitHub] [spark] peter-toth commented on a diff in pull request #40779: [SPARK-43124][SQL] Dataset.show projects CommandResults locally
peter-toth commented on code in PR #40779:
URL: https://github.com/apache/spark/pull/40779#discussion_r1165584032
##########
sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala:
##########
@@ -272,16 +272,32 @@ class Dataset[T] private[sql](
numRows: Int,
truncate: Int): Seq[Seq[String]] = {
val newDf = toDF()
- val castCols = newDf.logicalPlan.output.map { col =>
- // Since binary types in top-level schema fields have a specific format to print,
- // so we do not cast them to strings here.
- if (col.dataType == BinaryType) {
- Column(col)
- } else {
- Column(col).cast(StringType)
- }
+ val data = newDf.logicalPlan match {
Review Comment:
But then we would rely on running `ConvertToLocalRelation` that can be excluded. Isn't that an issue?
--
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