dongjoon-hyun commented on a change in pull request #27353: 
[SPARK-27166][SQL][FOLLOWUP] Refactor to build string once
URL: https://github.com/apache/spark/pull/27353#discussion_r370556871
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/types/MapType.scala
 ##########
 @@ -40,12 +40,17 @@ case class MapType(
   /** No-arg constructor for kryo. */
   def this() = this(null, null, false)
 
-  private[sql] def buildFormattedString(prefix: String, builder: 
StringBuilder): Unit = {
-    builder.append(s"$prefix-- key: ${keyType.typeName}\n")
-    DataType.buildFormattedString(keyType, s"$prefix    |", builder)
-    builder.append(s"$prefix-- value: ${valueType.typeName} " +
-      s"(valueContainsNull = $valueContainsNull)\n")
-    DataType.buildFormattedString(valueType, s"$prefix    |", builder)
+  private[sql] def buildFormattedString(
+      prefix: String,
+      builder: StringBuilder,
+      maxDepth: Int = Int.MaxValue): Unit = {
 
 Review comment:
   The default value is required because there exists some other test code 
using this.

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