Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
HyukjinKwon committed Mar 30, 2017
1 parent 75ebd18 commit 756825d
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ object DataType {
name match {
case "decimal" => DecimalType.USER_DEFAULT
case FIXED_DECIMAL(precision, scale) => DecimalType(precision.toInt, scale.toInt)
case other => nonDecimalNameToType.getOrElse(other, {
case other => nonDecimalNameToType.getOrElse(
other,
throw new IllegalArgumentException(
s"Failed to convert the JSON string '$name' to a data type.")
})
s"Failed to convert the JSON string '$name' to a data type."))
}
}

Expand Down Expand Up @@ -168,7 +168,7 @@ object DataType {
("type", JString("udt"))) =>
new PythonUserDefinedType(parseDataType(v), pyClass, serialized)

case other: JValue =>
case other =>
throw new IllegalArgumentException(
s"Failed to convert the JSON string '${compact(render(other))}' to a data type.")
}
Expand All @@ -186,7 +186,7 @@ object DataType {
("nullable", JBool(nullable)),
("type", dataType: JValue)) =>
StructField(name, parseDataType(dataType), nullable)
case other: JValue =>
case other =>
throw new IllegalArgumentException(
s"Failed to convert the JSON string '${compact(render(other))}' to a field.")
}
Expand Down

0 comments on commit 756825d

Please sign in to comment.