Skip to content

Commit

Permalink
[SPARK-6271][SQL] Sort these tokens in alphabetic order to avoid furt…
Browse files Browse the repository at this point in the history
…her duplicate in HiveQl

Author: DoingDone9 <[email protected]>

Closes apache#4973 from DoingDone9/sort_token and squashes the following commits:

855fa10 [DoingDone9] Update HiveQl.scala
c7080b3 [DoingDone9] Sort these tokens in alphabetic order to avoid further duplicate in HiveQl
c87e8b6 [DoingDone9] Merge pull request apache#3 from apache/master
cb1852d [DoingDone9] Merge pull request apache#2 from apache/master
c3f046f [DoingDone9] Merge pull request #1 from apache/master
  • Loading branch information
pzzs authored and marmbrus committed Mar 26, 2015
1 parent 73d5775 commit 328daf6
Showing 1 changed file with 46 additions and 42 deletions.
88 changes: 46 additions & 42 deletions sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,37 +55,8 @@ private[hive] case object NativePlaceholder extends Command
/** Provides a mapping from HiveQL statements to catalyst logical plans and expression trees. */
private[hive] object HiveQl {
protected val nativeCommands = Seq(
"TOK_DESCFUNCTION",
"TOK_DESCDATABASE",
"TOK_SHOW_CREATETABLE",
"TOK_SHOWCOLUMNS",
"TOK_SHOW_TABLESTATUS",
"TOK_SHOWDATABASES",
"TOK_SHOWFUNCTIONS",
"TOK_SHOWINDEXES",
"TOK_SHOWINDEXES",
"TOK_SHOWPARTITIONS",
"TOK_SHOW_TBLPROPERTIES",

"TOK_LOCKTABLE",
"TOK_SHOWLOCKS",
"TOK_UNLOCKTABLE",

"TOK_SHOW_ROLES",
"TOK_CREATEROLE",
"TOK_DROPROLE",
"TOK_GRANT",
"TOK_GRANT_ROLE",
"TOK_REVOKE",
"TOK_SHOW_GRANT",
"TOK_SHOW_ROLE_GRANT",
"TOK_SHOW_SET_ROLE",

"TOK_CREATEFUNCTION",
"TOK_DROPFUNCTION",

"TOK_ALTERDATABASE_PROPERTIES",
"TOK_ALTERDATABASE_OWNER",
"TOK_ALTERDATABASE_PROPERTIES",
"TOK_ALTERINDEX_PROPERTIES",
"TOK_ALTERINDEX_REBUILD",
"TOK_ALTERTABLE_ADDCOLS",
Expand All @@ -102,28 +73,61 @@ private[hive] object HiveQl {
"TOK_ALTERTABLE_SKEWED",
"TOK_ALTERTABLE_TOUCH",
"TOK_ALTERTABLE_UNARCHIVE",
"TOK_CREATEDATABASE",
"TOK_CREATEFUNCTION",
"TOK_CREATEINDEX",
"TOK_DROPDATABASE",
"TOK_DROPINDEX",
"TOK_DROPTABLE_PROPERTIES",
"TOK_MSCK",

"TOK_ALTERVIEW_ADDPARTS",
"TOK_ALTERVIEW_AS",
"TOK_ALTERVIEW_DROPPARTS",
"TOK_ALTERVIEW_PROPERTIES",
"TOK_ALTERVIEW_RENAME",

"TOK_CREATEDATABASE",
"TOK_CREATEFUNCTION",
"TOK_CREATEINDEX",
"TOK_CREATEROLE",
"TOK_CREATEVIEW",
"TOK_DROPVIEW_PROPERTIES",

"TOK_DESCDATABASE",
"TOK_DESCFUNCTION",

"TOK_DROPDATABASE",
"TOK_DROPFUNCTION",
"TOK_DROPINDEX",
"TOK_DROPROLE",
"TOK_DROPTABLE_PROPERTIES",
"TOK_DROPVIEW",

"TOK_DROPVIEW_PROPERTIES",

"TOK_EXPORT",

"TOK_GRANT",
"TOK_GRANT_ROLE",

"TOK_IMPORT",

"TOK_LOAD",

"TOK_SWITCHDATABASE"

"TOK_LOCKTABLE",

"TOK_MSCK",

"TOK_REVOKE",

"TOK_SHOW_CREATETABLE",
"TOK_SHOW_GRANT",
"TOK_SHOW_ROLE_GRANT",
"TOK_SHOW_ROLES",
"TOK_SHOW_SET_ROLE",
"TOK_SHOW_TABLESTATUS",
"TOK_SHOW_TBLPROPERTIES",
"TOK_SHOWCOLUMNS",
"TOK_SHOWDATABASES",
"TOK_SHOWFUNCTIONS",
"TOK_SHOWINDEXES",
"TOK_SHOWLOCKS",
"TOK_SHOWPARTITIONS",

"TOK_SWITCHDATABASE",

"TOK_UNLOCKTABLE"
)

// Commands that we do not need to explain.
Expand Down

0 comments on commit 328daf6

Please sign in to comment.