|
|
@@ -88,6 +88,7 @@ AlterTable
|
|
|
| AlterTableLeftSide DropOperations
|
|
|
| AlterTableLeftSide OptionalPartitionOperations
|
|
|
| AlterTableLeftSide PartitionSpec OptionalPartitionOperations
|
|
|
+ | AlterTableLeftSide '<impala>RECOVER' '<impala>PARTITIONS'
|
|
|
;
|
|
|
|
|
|
AlterTable_EDIT
|
|
|
@@ -157,9 +158,9 @@ AlterTable_EDIT
|
|
|
'RECOVER PARTITIONS', 'RENAME TO', 'REPLACE COLUMNS', 'SET FILEFORMAT', 'SET LOCATION', 'SET SERDE',
|
|
|
'SET SERDEPROPERTIES', 'SET SKEWED LOCATION', 'SET TBLPROPERTIES', 'SKEWED BY', 'TOUCH', 'UNARCHIVE PARTITION']);
|
|
|
} else if (parser.isImpala()) {
|
|
|
- parser.suggestKeywords(['ADD COLUMNS', 'ADD PARTITION', 'CHANGE', 'DROP COLUMN', 'DROP PARTITION', 'PARTITION',
|
|
|
- 'RENAME TO', 'REPLACE COLUMNS', 'SET CACHED IN', 'SET FILEFORMAT', 'SET LOCATION', 'SET SERDEPROPERTIES',
|
|
|
- 'SET TBLPROPERTIES', 'SET UNCACHED']);
|
|
|
+ parser.suggestKeywords(['ADD COLUMNS', 'ADD PARTITION', 'ADD RANGE PARTITION', 'CHANGE', 'DROP COLUMN',
|
|
|
+ 'DROP PARTITION', 'DROP RANGE PARTITION', 'PARTITION', 'RECOVER PARTITIONS', 'RENAME TO', 'REPLACE COLUMNS',
|
|
|
+ 'SET CACHED IN', 'SET FILEFORMAT', 'SET LOCATION','SET SERDEPROPERTIES', 'SET TBLPROPERTIES', 'SET UNCACHED']);
|
|
|
}
|
|
|
}
|
|
|
| AlterTableLeftSide PartitionSpec 'CURSOR'
|
|
|
@@ -178,21 +179,21 @@ AlterTable_EDIT
|
|
|
parser.suggestKeywords(['COLUMNS']);
|
|
|
}
|
|
|
| AlterTableLeftSide PartitionSpec 'SET' 'CURSOR'
|
|
|
- {
|
|
|
- if (parser.isHive()) {
|
|
|
- parser.suggestKeywords(['FILEFORMAT', 'LOCATION', 'SERDE', 'SERDEPROPERTIES']);
|
|
|
- } else if (parser.isImpala()) {
|
|
|
- parser.suggestKeywords(['CACHED IN', 'FILEFORMAT', 'LOCATION', 'SERDEPROPERTIES','TBLPROPERTIES', 'UNCACHED']);
|
|
|
- }
|
|
|
- }
|
|
|
+ {
|
|
|
+ if (parser.isHive()) {
|
|
|
+ parser.suggestKeywords(['FILEFORMAT', 'LOCATION', 'SERDE', 'SERDEPROPERTIES']);
|
|
|
+ } else if (parser.isImpala()) {
|
|
|
+ parser.suggestKeywords(['CACHED IN', 'FILEFORMAT', 'LOCATION', 'SERDEPROPERTIES','TBLPROPERTIES', 'UNCACHED']);
|
|
|
+ }
|
|
|
+ }
|
|
|
| AlterTableLeftSide 'SET' 'CURSOR'
|
|
|
- {
|
|
|
- if (parser.isHive()) {
|
|
|
- parser.suggestKeywords(['FILEFORMAT', 'LOCATION', 'SERDE', 'SERDEPROPERTIES', 'SKEWED LOCATION', 'TBLPROPERTIES']);
|
|
|
- } else if (parser.isImpala()) {
|
|
|
- parser.suggestKeywords(['CACHED IN', 'FILEFORMAT', 'LOCATION', 'SERDEPROPERTIES', 'TBLPROPERTIES', 'UNCACHED']);
|
|
|
- }
|
|
|
- }
|
|
|
+ {
|
|
|
+ if (parser.isHive()) {
|
|
|
+ parser.suggestKeywords(['FILEFORMAT', 'LOCATION', 'SERDE', 'SERDEPROPERTIES', 'SKEWED LOCATION', 'TBLPROPERTIES']);
|
|
|
+ } else if (parser.isImpala()) {
|
|
|
+ parser.suggestKeywords(['CACHED IN', 'FILEFORMAT', 'LOCATION', 'SERDEPROPERTIES', 'TBLPROPERTIES', 'UNCACHED']);
|
|
|
+ }
|
|
|
+ }
|
|
|
| AlterTableLeftSide PartitionSpec OptionalPartitionOperations_EDIT
|
|
|
| AlterTableLeftSide AnyRename 'CURSOR'
|
|
|
{
|
|
|
@@ -202,6 +203,10 @@ AlterTable_EDIT
|
|
|
{
|
|
|
parser.suggestDatabases({ appendDot: true });
|
|
|
}
|
|
|
+ | AlterTableLeftSide '<impala>RECOVER' 'CURSOR'
|
|
|
+ {
|
|
|
+ parser.suggestKeywords(['PARTITIONS']);
|
|
|
+ }
|
|
|
;
|
|
|
|
|
|
HiveSpecificOperations
|
|
|
@@ -405,48 +410,48 @@ OneOrMorePartitionSpecLists_EDIT
|
|
|
;
|
|
|
|
|
|
DropOperations
|
|
|
- : 'DROP' OneOrMorePartitionSpecs OptionalHivePurge
|
|
|
- | 'DROP' 'IF' 'EXISTS' OneOrMorePartitionSpecs OptionalHivePurge
|
|
|
- | 'DROP' ColumnIdentifier
|
|
|
+ : 'DROP' OptionalIfExists OneOrMorePartitionSpecs OptionalHivePurge
|
|
|
+ | 'DROP' OptionalIfExists '<impala>RANGE'
|
|
|
+ | 'DROP' OptionalIfExists '<impala>RANGE' 'PARTITION' RangePartitionSpec
|
|
|
+ | 'DROP' OptionalIfExists '<impala>RANGE' '<impala>PARTITION_VALUE' '=' UnsignedValueSpecification
|
|
|
| 'DROP' '<impala>COLUMN' ColumnIdentifier
|
|
|
;
|
|
|
|
|
|
-DropOperations
|
|
|
- : 'DROP' 'CURSOR'
|
|
|
+DropOperations_EDIT
|
|
|
+ : 'DROP' OptionalIfExists 'CURSOR'
|
|
|
{
|
|
|
- if (parser.isHive()) {
|
|
|
+ if (parser.isHive() && !$2) {
|
|
|
parser.suggestKeywords([{ value: 'PARTITION', weight: 1}, { value: 'IF EXISTS', weight: 2 }]);
|
|
|
- } else if (parser.isImpala()) {
|
|
|
- parser.suggestKeywords(['COLUMN', 'PARTITION']);
|
|
|
+ } else if (parser.isHive()) {
|
|
|
+ parser.suggestKeywords(['PARTITION']);
|
|
|
+ } else if (parser.isImpala() && !$2) {
|
|
|
+ parser.suggestKeywords([{ value: 'COLUMN', weight: 1 }, { value: 'PARTITION', weight: 1 }, { value: 'RANGE PARTITION', weight: 1 }, { value: 'IF EXISTS', weight: 2 }]);
|
|
|
parser.suggestColumns();
|
|
|
+ } else if (parser.isImpala()) {
|
|
|
+ parser.suggestKeywords(['PARTITION', 'RANGE PARTITION']);
|
|
|
}
|
|
|
}
|
|
|
- | 'DROP' OneOrMorePartitionSpecs_EDIT OptionalHivePurge
|
|
|
- | 'DROP' OneOrMorePartitionSpecs OptionalHivePurge 'CURSOR'
|
|
|
+ | 'DROP' OptionalIfExists OneOrMorePartitionSpecs_EDIT OptionalHivePurge
|
|
|
+ | 'DROP' OptionalIfExists OneOrMorePartitionSpecs OptionalHivePurge 'CURSOR'
|
|
|
{
|
|
|
- if (parser.isHive() && !$3) {
|
|
|
+ if (parser.isHive() && !$4) {
|
|
|
parser.suggestKeywords(['PURGE']);
|
|
|
}
|
|
|
}
|
|
|
- | 'DROP' 'IF' 'CURSOR'
|
|
|
+ | 'DROP' OptionalIfExists_EDIT
|
|
|
+ | 'DROP' OptionalIfExists '<impala>RANGE' 'CURSOR'
|
|
|
{
|
|
|
- if (parser.isHive()) {
|
|
|
- parser.suggestKeywords(['EXISTS']);
|
|
|
- }
|
|
|
+ parser.suggestKeywords(['PARTITION']);
|
|
|
}
|
|
|
- | 'DROP' 'IF' 'EXISTS' 'CURSOR'
|
|
|
- {
|
|
|
- if (parser.isHive()) {
|
|
|
- parser.suggestKeywords(['PARTITION']);
|
|
|
- }
|
|
|
- }
|
|
|
- | 'DROP' 'IF' 'EXISTS' OneOrMorePartitionSpecs_EDIT OptionalHivePurge
|
|
|
- | 'DROP' 'IF' 'EXISTS' OneOrMorePartitionSpecs OptionalHivePurge 'CURSOR'
|
|
|
+ | 'DROP' OptionalIfExists '<impala>RANGE' 'PARTITION' 'CURSOR'
|
|
|
{
|
|
|
- if (parser.isHive() && !$3) {
|
|
|
- parser.suggestKeywords(['PURGE']);
|
|
|
- }
|
|
|
+ parser.suggestKeywords(['VALUE']);
|
|
|
+ }
|
|
|
+ | 'DROP' OptionalIfExists '<impala>RANGE' '<impala>PARTITION_VALUE' 'CURSOR'
|
|
|
+ {
|
|
|
+ parser.suggestKeywords(['=']);
|
|
|
}
|
|
|
+ | 'DROP' OptionalIfExists '<impala>RANGE' 'PARTITION' RangePartitionSpec_EDIT
|
|
|
| 'DROP' ColumnIdentifier_EDIT
|
|
|
| 'DROP' '<impala>COLUMN' 'CURSOR'
|
|
|
{
|