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

    https://github.com/apache/spark/pull/22429#discussion_r217928262
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala 
---
    @@ -469,7 +470,17 @@ abstract class TreeNode[BaseType <: 
TreeNode[BaseType]] extends Product {
       def treeString: String = treeString(verbose = true)
     
       def treeString(verbose: Boolean, addSuffix: Boolean = false): String = {
    -    generateTreeString(0, Nil, new StringBuilder, verbose = verbose, 
addSuffix = addSuffix).toString
    +    val baos = new ByteArrayOutputStream()
    --- End diff --
    
    What is the benefit of using this instead of using a `java.io.StringWriter` 
or `org.apache.commons.io.output.StringBuilderWriter`?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to