peter-toth commented on code in PR #40779:
URL: https://github.com/apache/spark/pull/40779#discussion_r1166357919
##########
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:
All right, then
https://github.com/apache/spark/pull/40779/commits/d8210ff849727961681b7d9df71b70e19ae24d41
contains the deduplication. Thanks for the idea.
--
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]