@@ -78,11 +78,11 @@ singleTableSchema
78
78
statement
79
79
: query #statementDefault
80
80
| USE db=identifier #use
81
- | CREATE DATABASE (IF NOT EXISTS )? identifier
81
+ | CREATE database (IF NOT EXISTS )? identifier
82
82
(COMMENT comment=STRING )? locationSpec?
83
83
(WITH DBPROPERTIES tablePropertyList)? #createDatabase
84
- | ALTER DATABASE identifier SET DBPROPERTIES tablePropertyList #setDatabaseProperties
85
- | DROP DATABASE (IF EXISTS )? identifier (RESTRICT | CASCADE )? #dropDatabase
84
+ | ALTER database identifier SET DBPROPERTIES tablePropertyList #setDatabaseProperties
85
+ | DROP database (IF EXISTS )? identifier (RESTRICT | CASCADE )? #dropDatabase
86
86
| createTableHeader (' (' colTypeList ' )' )? tableProvider
87
87
((OPTIONS options =tablePropertyList) |
88
88
(PARTITIONED BY partitionColumnNames=identifierList) |
@@ -163,7 +163,7 @@ statement
163
163
(LIKE? (qualifiedName | pattern=STRING))? #showFunctions
164
164
| SHOW CREATE TABLE tableIdentifier #showCreateTable
165
165
| (DESC | DESCRIBE) FUNCTION EXTENDED? describeFuncName #describeFunction
166
- | (DESC | DESCRIBE) DATABASE EXTENDED? identifier #describeDatabase
166
+ | (DESC | DESCRIBE) database EXTENDED? identifier #describeDatabase
167
167
| (DESC | DESCRIBE) TABLE? option=(EXTENDED | FORMATTED)?
168
168
tableIdentifier partitionSpec? describeColName? #describeTable
169
169
| REFRESH TABLE tableIdentifier #refreshTable
@@ -274,6 +274,11 @@ partitionVal
274
274
: identifier (EQ constant)?
275
275
;
276
276
277
+ database
278
+ : DATABASE
279
+ | SCHEMA
280
+ ;
281
+
277
282
describeFuncName
278
283
: qualifiedName
279
284
| STRING
0 commit comments