You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/08/19 11:39:15 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #25495: [WIP] repr(schema) and schema.toString produce runnable code

HyukjinKwon commented on a change in pull request #25495: [WIP] repr(schema) and schema.toString produce runnable code
URL: https://github.com/apache/spark/pull/25495#discussion_r315165535
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/types/StructField.scala
 ##########
 @@ -49,7 +49,7 @@ case class StructField(
   }
 
   // override the default toString to be compatible with legacy parquet files.
-  override def toString: String = s"StructField($name,$dataType,$nullable)"
+  override def toString: String = s"""StructField("$name",$dataType,$nullable)"""
 
 Review comment:
   Scala sides doesn't have `repr` contract to make it re-construct-able like Python sides.
   Also, I think this can't handle `"` character in the middle of its name, for instance.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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