hvanhovell commented on a change in pull request #23169: [SPARK-26103][SQL] 
Limit the length of debug strings for query plans
URL: https://github.com/apache/spark/pull/23169#discussion_r249369346
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/StringUtils.scala
 ##########
 @@ -92,31 +95,57 @@ object StringUtils {
 
   /**
    * Concatenation of sequence of strings to final string with cheap append 
method
-   * and one memory allocation for the final string.
+   * and one memory allocation for the final string.  Can also bound the final 
size of
+   * the string.
    */
-  class StringConcat {
+  class StringConcat(val maxLength: Int = Integer.MAX_VALUE) {
 
 Review comment:
   You generally cannot allocate an array of `Integer.MAX_VALUE` elements. Can 
you use `ByteArrayMethods.MAX_ROUNDED_ARRAY_LENGTH` instead.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to