Skip to content

Commit d02547f

Browse files
committed
fix HiveCompatibilitySuite test failure
1 parent 8dfbf7a commit d02547f

File tree

1 file changed

+6
-3
lines changed
  • sql/core/src/main/scala/org/apache/spark/sql/sources

1 file changed

+6
-3
lines changed

sql/core/src/main/scala/org/apache/spark/sql/sources/ddl.scala

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,12 @@ private[sql] class DDLParser extends StandardTokenParsers with PackratParsers wi
161161
}
162162

163163
protected lazy val structType: Parser[DataType] =
164-
STRUCT ~> "<" ~> repsep(structField, ",") <~ ">" ^^ {
165-
case fields => new StructType(fields)
166-
}
164+
(STRUCT ~> "<" ~> repsep(structField, ",") <~ ">" ^^ {
165+
case fields => new StructType(fields)
166+
}) |
167+
(STRUCT ~> "<>" ^^ {
168+
case fields => new StructType(Nil)
169+
})
167170

168171
private[sql] lazy val dataType: Parser[DataType] =
169172
arrayType |

0 commit comments

Comments
 (0)