Skip to content

Commit a663b5c

Browse files
author
Andrew Or
committed
Minor fixes
1 parent 02de9b7 commit a663b5c

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/SparkQl.scala

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ private[sql] class SparkQl(conf: ParserConf = SimpleParserConf()) extends Cataly
9595
"TOK_DATABASELOCATION",
9696
"TOK_DATABASECOMMENT",
9797
"TOK_DATABASEPROPERTIES"), createDatabaseArgs)
98-
9998
val location = dbLocation.map {
10099
case Token("TOK_DATABASELOCATION", Token(loc, Nil) :: Nil) => unquoteString(loc)
101100
}
@@ -106,7 +105,6 @@ private[sql] class SparkQl(conf: ParserConf = SimpleParserConf()) extends Cataly
106105
case Token("TOK_DATABASEPROPERTIES", propList) =>
107106
propList.flatMap(extractProps(_, "TOK_DBPROPLIST", "TOK_TABLEPROPERTY"))
108107
}.toMap
109-
110108
CreateDatabase(databaseName, allowExisting.isDefined, location, comment, props)(node.source)
111109

112110
case Token("TOK_CREATEFUNCTION", func :: as :: createFuncArgs) =>
@@ -117,7 +115,6 @@ private[sql] class SparkQl(conf: ParserConf = SimpleParserConf()) extends Cataly
117115
temp) = getClauses(Seq(
118116
"TOK_RESOURCE_LIST",
119117
"TOK_TEMPORARY"), createFuncArgs)
120-
121118
val resourcesMap: Map[String, String] = rList.toSeq.flatMap {
122119
case Token("TOK_RESOURCE_LIST", resources) =>
123120
resources.map {
@@ -144,12 +141,12 @@ private[sql] class SparkQl(conf: ParserConf = SimpleParserConf()) extends Cataly
144141
Some(Token("TOK_TABLEPROVIDER", providerNameParts)),
145142
tableOpts,
146143
tableAs) = getClauses(Seq(
147-
"TEMPORARY",
148-
"TOK_IFNOTEXISTS",
149-
"TOK_TABNAME", "TOK_TABCOLLIST",
150-
"TOK_TABLEPROVIDER",
151-
"TOK_TABLEOPTIONS",
152-
"TOK_QUERY"), createTableArgs)
144+
"TEMPORARY",
145+
"TOK_IFNOTEXISTS",
146+
"TOK_TABNAME", "TOK_TABCOLLIST",
147+
"TOK_TABLEPROVIDER",
148+
"TOK_TABLEOPTIONS",
149+
"TOK_QUERY"), createTableArgs)
153150

154151
val tableIdent: TableIdentifier = extractTableIdent(tabName)
155152

sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ case class AlterTableSerDeProperties(
8282
case class AlterTableStoreProperties(
8383
tableName: TableIdentifier,
8484
buckets: Option[BucketSpec],
85+
// TODO: use `clustered` and `sorted` instead for simplicity
8586
noClustered: Boolean,
8687
noSorted: Boolean)(sql: String)
8788
extends NativeDDLCommands(sql) with Logging

0 commit comments

Comments
 (0)