Skip to content

Commit ef6f986

Browse files
committed
make double boolean miss in jsonRDD compatibleType
1 parent c619f0a commit ef6f986

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/core/src/main/scala/org/apache/spark/sql/json/JsonRDD.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ private[sql] object JsonRDD extends Logging {
135135
if (returnType.isDefined) {
136136
returnType.get
137137
} else {
138-
// t1 or t2 is a StructType, ArrayType, or an unexpected type.
138+
// t1 or t2 is a StructType, ArrayType, BooleanType, or an unexpected type.
139139
(t1, t2) match {
140140
case (other: DataType, NullType) => other
141141
case (NullType, other: DataType) => other
@@ -155,6 +155,7 @@ private[sql] object JsonRDD extends Logging {
155155
ArrayType(compatibleType(elementType1, elementType2), containsNull1 || containsNull2)
156156
// TODO: We should use JsonObjectStringType to mark that values of field will be
157157
// strings and every string is a Json object.
158+
case (BooleanType, BooleanType) => BooleanType
158159
case (_, _) => StringType
159160
}
160161
}

0 commit comments

Comments
 (0)