Github user ScrapCodes commented on a diff in the pull request:
https://github.com/apache/spark/pull/13839#discussion_r68036752
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
@@ -251,7 +253,11 @@ class Dataset[T] private[sql](
case seq: Seq[_] => seq.mkString("[", ", ", "]")
case _ => cell.toString
}
- if (truncate && str.length > 20) str.substring(0, 17) + "..." else
str
+ if (truncateTo > 0 && str.length > truncateTo) {
+ // do not show ellipses for strings shorter than 4 characters.
+ if (truncateTo < 4) str.substring(0, truncateTo)
+ else str.substring(0, truncateTo - 3) + "..."
--- End diff --
I did not like this check, but added it to ensure we do not deviate from
the existing default behavior.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]