Skip to content

Commit

Permalink
remove StructField.toString
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed Oct 15, 2014
1 parent 24a9f80 commit 3f49aab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,6 @@ case class StructField(
DataType.buildFormattedString(dataType, s"$prefix |", builder)
}

override def toString: String = {
// Do not add metadata to be consistent with CaseClassStringParser.
s"StructField($name,$dataType,$nullable)"
}

private[sql] def jsonValue: JValue = {
("name" -> name) ~
("type" -> dataType.jsonValue) ~
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ object Metadata {
private def toJsonValue(obj: Any): JValue = {
obj match {
case map: Map[_, _] =>
val fields = map.toList.map { case (k: String, v) => (k, toJsonValue(v))}
val fields = map.toList.map { case (k: String, v) => (k, toJsonValue(v)) }
JObject(fields)
case arr: Array[_] =>
val values = arr.toList.map(toJsonValue)
Expand Down

0 comments on commit 3f49aab

Please sign in to comment.