Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6633#discussion_r31760477
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala ---
    @@ -175,20 +175,36 @@ class DataFrame private[sql](
         val sb = new StringBuilder
         val data = take(numRows)
         val numCols = schema.fieldNames.length
    +    val primitive: Seq[Boolean] = schema.map(f => f.dataType.isPrimitive)
     
         // For cells that are beyond 20 characters, replace it with the first 
17 and "..."
    +    def widthCheck (x: String) : String = {
    +      if (x.length>20) x.substring(0, 17) + "..." else x
    +    }
    +
    +    // For array values, replace ArrayBuffer, with square brackets
    +    def sqrBrckts (x: String) : String = {
    --- End diff --
    
    this is fairly complicated. can you rewrite it in a more straightforward 
way?


---
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]

Reply via email to