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_r262838279
##########
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")
- val hiveStrictNonReservedKeyword = Seq("anti", "full", "inner", "left",
"semi", "right",
- "natural", "union", "intersect", "except", "database", "on", "join",
"cross", "select", "from",
- "where", "having", "from", "to", "table", "with", "not")
+ val hiveStrictNonReservedKeyword = Seq("anti", "cross", "database",
"except", "from", "full",
+ "having", "inner", "intersect", "join", "left", "natural", "not", "on",
"right", "select",
+ "semi", "table", "to", "union", "where", "with")
Review comment:
put them in alphabet order and remove one repeated word: `"from"`
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]