You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/03/06 08:40:10 UTC

[GitHub] [spark] SongYadong commented on a change in pull request #23985: [SQL][MINOR] List SparkSql reserved keywords in alphabet order

SongYadong commented on a change in pull request #23985: [SQL][MINOR] List SparkSql reserved keywords in alphabet order
URL: https://github.com/apache/spark/pull/23985#discussion_r262838076
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/TableIdentifierParserSuite.scala
 ##########
 @@ -23,39 +23,39 @@ class TableIdentifierParserSuite extends SparkFunSuite {
   import CatalystSqlParser._
 
   // Add "$elem$", "$value$" & "$key$"
-  val hiveNonReservedKeyword = Array("add", "admin", "after", "analyze", "archive", "asc", "before",
-    "bucket", "buckets", "cascade", "change", "cluster", "clustered", "clusterstatus", "collection",
-    "columns", "comment", "compact", "compactions", "compute", "concatenate", "continue", "cost",
-    "data", "day", "databases", "datetime", "dbproperties", "deferred", "defined", "delimited",
-    "dependency", "desc", "directories", "directory", "disable", "distribute",
-    "enable", "escaped", "exclusive", "explain", "export", "fields", "file", "fileformat", "first",
-    "format", "formatted", "functions", "hold_ddltime", "hour", "idxproperties", "ignore", "index",
-    "indexes", "inpath", "inputdriver", "inputformat", "items", "jar", "keys", "key_type", "last",
-    "limit", "offset", "lines", "load", "location", "lock", "locks", "logical", "long", "mapjoin",
-    "materialized", "metadata", "minus", "minute", "month", "msck", "noscan", "no_drop", "nulls",
-    "offline", "option", "outputdriver", "outputformat", "overwrite", "owner", "partitioned",
-    "partitions", "plus", "pretty", "principals", "protection", "purge", "read", "readonly",
-    "rebuild", "recordreader", "recordwriter", "reload", "rename", "repair", "replace",
-    "replication", "restrict", "rewrite", "role", "roles", "schemas", "second",
-    "serde", "serdeproperties", "server", "sets", "shared", "show", "show_database", "skewed",
-    "sort", "sorted", "ssl", "statistics", "stored", "streamtable", "string", "struct", "tables",
-    "tblproperties", "temporary", "terminated", "tinyint", "touch", "transactions", "unarchive",
-    "undo", "uniontype", "unlock", "unset", "unsigned", "uri", "use", "utc", "utctimestamp",
-    "view", "while", "year", "work", "transaction", "write", "isolation", "level", "snapshot",
-    "autocommit", "all", "any", "alter", "array", "as", "authorization", "between", "bigint",
-    "binary", "boolean", "both", "by", "create", "cube", "current_date", "current_timestamp",
-    "cursor", "date", "decimal", "delete", "describe", "double", "drop", "exists", "external",
-    "false", "fetch", "float", "for", "grant", "group", "grouping", "import", "in",
-    "insert", "int", "into", "is", "pivot", "lateral", "like", "local", "none", "null",
-    "of", "order", "out", "outer", "partition", "percent", "procedure", "query", "range", "reads",
-    "revoke", "rollup", "row", "rows", "set", "smallint", "table", "timestamp", "to", "trigger",
-    "true", "truncate", "update", "user", "values", "with", "regexp", "rlike",
-    "bigint", "binary", "boolean", "current_date", "current_timestamp", "date", "double", "float",
-    "int", "smallint", "timestamp", "at", "position", "both", "leading", "trailing", "extract")
+  // It is recommended to list them in alphabetical order.
+  val hiveNonReservedKeyword = Array("add", "admin", "after", "all", "alter", "analyze", "any",
+    "archive", "array", "as", "asc", "at", "authorization", "autocommit", "before", "between",
+    "bigint", "bigint", "binary", "boolean", "both", "bucket", "buckets", "by", "cascade",
+    "change", "cluster", "clustered", "clusterstatus", "collection", "columns", "comment",
+    "compact", "compactions", "compute", "concatenate", "continue", "cost", "create", "cube",
+    "current_date", "current_timestamp", "cursor", "data", "databases", "date", "datetime", "day",
+    "dbproperties", "decimal", "deferred", "defined", "delete", "delimited", "dependency", "desc",
+    "describe", "directories", "directory", "disable", "distribute", "double", "drop", "enable",
+    "escaped", "exclusive", "exists", "explain", "export", "external", "extract", "false", "fetch",
+    "fields", "file", "fileformat", "first", "float", "for", "format", "formatted", "functions",
+    "grant", "group", "grouping", "hold_ddltime", "hour", "idxproperties", "ignore", "import",
+    "in", "index", "indexes", "inpath", "inputdriver", "inputformat", "insert", "int", "into",
+    "is", "isolation", "items", "jar", "key_type", "keys", "last", "lateral", "leading", "level",
+    "like", "limit", "lines", "load", "local", "location", "lock", "locks", "logical", "long",
+    "mapjoin", "materialized", "metadata", "minus", "minute", "month", "msck", "no_drop", "none",
+    "noscan", "null", "nulls", "of", "offline", "offset", "option", "order", "out", "outer",
+    "outputdriver", "outputformat", "overwrite", "owner", "partition", "partitioned", "partitions",
+    "percent", "pivot", "plus", "position", "pretty", "principals", "procedure", "protection",
+    "purge", "query", "range", "read", "readonly", "reads", "rebuild", "recordreader",
+    "recordwriter", "regexp", "reload", "rename", "repair", "replace", "replication", "restrict",
+    "revoke", "rewrite", "rlike", "role", "roles", "rollup", "row", "rows", "schemas", "second",
+    "serde", "serdeproperties", "server", "set", "sets", "shared", "show", "show_database",
+    "skewed", "smallint", "snapshot", "sort", "sorted", "ssl", "statistics", "stored",
+    "streamtable", "string", "struct", "table", "tables", "tblproperties", "temporary",
+    "terminated", "timestamp", "tinyint", "to", "touch", "trailing", "transaction", "transactions",
+    "trigger", "true", "truncate", "unarchive", "undo", "uniontype", "unlock", "unset", "unsigned",
+    "update", "uri", "use", "user", "utc", "utctimestamp", "values", "view", "while", "with",
+    "work", "write", "year")
 
 Review comment:
   put them in alphabet order and remove some repeated words, including:
   `"int", "smallint", "double", "float", "timestamp", "binary", "boolean", "both", "current_date", "current_timestamp", "date"`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org