Skip to content

Commit a852b10

Browse files
committed
remove cleanIdentifier
1 parent f336a16 commit a852b10

File tree

1 file changed

+2
-9
lines changed
  • sql/core/src/main/scala/org/apache/spark/sql/sources

1 file changed

+2
-9
lines changed

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ private[sql] class DDLParser extends StandardTokenParsers with PackratParsers wi
121121

122122
protected lazy val column: Parser[StructField] =
123123
ident ~ dataType ^^ { case columnName ~ typ =>
124-
StructField(cleanIdentifier(columnName), typ)
124+
StructField(columnName, typ)
125125
}
126126

127127
protected lazy val primitiveType: Parser[DataType] =
@@ -157,7 +157,7 @@ private[sql] class DDLParser extends StandardTokenParsers with PackratParsers wi
157157

158158
protected lazy val structField: Parser[StructField] =
159159
ident ~ ":" ~ dataType ^^ {
160-
case fieldName ~ _ ~ tpe => StructField(cleanIdentifier(fieldName), tpe, nullable = true)
160+
case fieldName ~ _ ~ tpe => StructField(fieldName, tpe, nullable = true)
161161
}
162162

163163
protected lazy val structType: Parser[DataType] =
@@ -173,13 +173,6 @@ private[sql] class DDLParser extends StandardTokenParsers with PackratParsers wi
173173
mapType |
174174
structType |
175175
primitiveType
176-
177-
protected val escapedIdentifier = "`([^`]+)`".r
178-
/** Strips backticks from ident if present */
179-
protected def cleanIdentifier(ident: String): String = ident match {
180-
case escapedIdentifier(i) => i
181-
case plainIdent => plainIdent
182-
}
183176
}
184177

185178
private[sql] case class CreateTableUsing(

0 commit comments

Comments
 (0)