Преглед на файлове

HUE-6958 [autocomplete] Update autocomplete for Hive ALTER TABLE statements

Johan Ahlen преди 8 години
родител
ревизия
02d1008

+ 3 - 0
desktop/core/src/desktop/static/desktop/js/autocomplete/jison/sql.jisonlex

@@ -134,6 +134,7 @@
 <hive>'MINUTE'                             { return '<hive>MINUTE'; }
 <hive>'MONTH'                              { return '<hive>MONTH'; }
 <hive>'MSCK'                               { return '<hive>MSCK'; }
+<hive>'NORELY'                             { return '<hive>NORELY'; }
 <hive>'NOSCAN'                             { return '<hive>NOSCAN'; }
 <hive>'NOVALIDATE'                         { return '<hive>NOVALIDATE'; }
 <hive>'NO_DROP'                            { return '<hive>NO_DROP'; }
@@ -152,6 +153,7 @@
 <hive>'RCFILE'                             { return '<hive>RCFILE'; }
 <hive>'REBUILD'                            { return '<hive>REBUILD'; }
 <hive>'RELOAD'                             { parser.determineCase(yytext); return '<hive>RELOAD'; }
+<hive>'RELY'                               { return '<hive>RELY'; }
 <hive>'REPAIR'                             { return '<hive>REPAIR'; }
 <hive>'REPLICATION'                        { return '<hive>REPLICATION'; }
 <hive>'RECOVER'                            { return '<hive>RECOVER'; }
@@ -191,6 +193,7 @@
 <hive>'UNIONTYPE'                          { return '<hive>UNIONTYPE'; }
 <hive>'USE'                                { parser.determineCase(yytext); return '<hive>USE'; }
 <hive>'VIEW'                               { return '<hive>VIEW'; }
+<hive>'WAIT'                               { return '<hive>WAIT'; }
 <hive>'WEEK'                               { return '<hive>WEEK'; }
 <hive>'WINDOW'                             { return '<hive>WINDOW'; }
 <hive>'YEAR'                               { return '<hive>YEAR'; }

+ 65 - 4
desktop/core/src/desktop/static/desktop/js/autocomplete/jison/sql_alter.jison

@@ -118,6 +118,8 @@ AlterTable
  : AlterTableLeftSide AnyAdd OptionalIfNotExists PartitionSpec OptionalHdfsLocation OptionalPartitionSpecs OptionalCachedInOrUncached
  | AlterTableLeftSide AnyAdd OptionalIfNotExists '<impala>RANGE' 'PARTITION' RangePartitionSpec
  | AlterTableLeftSide AnyAdd OptionalIfNotExists '<impala>RANGE' '<impala>PARTITION_VALUE' '=' UnsignedValueSpecification
+ | AlterTableLeftSide AnyAdd '<hive>CONSTRAINT' RegularOrBacktickedIdentifier HivePrimaryKeySpecification
+ | AlterTableLeftSide AnyAdd '<hive>CONSTRAINT' RegularOrBacktickedIdentifier HiveForeignKeySpecification
  | AlterTableLeftSide AnyRename 'TO' RegularOrBackTickedSchemaQualifiedName
  | AlterTableLeftSide HiveSpecificOperations
  | AlterTableLeftSide DropOperations
@@ -139,7 +141,7 @@ AlterTable_EDIT
      if (!$3 && parser.isImpala()) {
        parser.suggestKeywords([{ value: 'IF NOT EXISTS', weight: 4 }, { value: 'COLUMNS', weight: 3 }, { value: 'PARTITION', weight: 2 }, { value: 'RANGE PARTITION', weight: 1 }]);
      } else if (!$3 && parser.isHive()) {
-       parser.suggestKeywords([{ value: 'IF NOT EXISTS', weight: 3 }, { value: 'COLUMNS', weight: 2 }, { value: 'PARTITION', weight: 1 }]);
+       parser.suggestKeywords([{ value: 'IF NOT EXISTS', weight: 3 }, { value: 'COLUMNS', weight: 2 }, { value: 'CONSTRAINT', weight: 1 }, {  value: 'PARTITION', weight: 1 }]);
      } else if (parser.isImpala()) {
        parser.suggestKeywords([{ value: 'PARTITION', weight: 2 }, { value: 'RANGE PARTITION', weight: 1 }]);
      } else if (parser.isHive()) {
@@ -190,6 +192,13 @@ AlterTable_EDIT
      parser.suggestKeywords(['=']);
    }
  | AlterTableLeftSide AnyAdd OptionalIfNotExists '<impala>RANGE' 'PARTITION' RangePartitionSpec_EDIT
+ | AlterTableLeftSide AnyAdd '<hive>CONSTRAINT' 'CURSOR'
+ | AlterTableLeftSide AnyAdd '<hive>CONSTRAINT' RegularOrBacktickedIdentifier 'CURSOR'
+   {
+     parser.suggestKeywords(['FOREIGN KEY', 'PRIMARY KEY']);
+   }
+ | AlterTableLeftSide AnyAdd '<hive>CONSTRAINT' RegularOrBacktickedIdentifier HivePrimaryKeySpecification_EDIT
+ | AlterTableLeftSide AnyAdd '<hive>CONSTRAINT' RegularOrBacktickedIdentifier HiveForeignKeySpecification_EDIT
  | AlterTableLeftSide HiveSpecificOperations_EDIT
  | AlterTableLeftSide OptionalPartitionOperations_EDIT
  | AlterTableLeftSide DropOperations_EDIT
@@ -340,7 +349,7 @@ OptionalPartitionOperations
  | 'SET' '<impala>UNCACHED'
  | AddReplaceColumns
  | '<hive>CONCATENATE'
- | '<hive>COMPACT' QuotedValue
+ | '<hive>COMPACT' QuotedValue OptionalAndWait OptionalWithOverwriteTblProperties
  | HiveEnableOrDisable HiveNoDropOrOffline
  | AnyChange OptionalHiveColumn ColumnIdentifier ColumnSpecification OptionalHiveFirstOrAfter OptionalHiveCascadeOrRestrict
  ;
@@ -370,10 +379,21 @@ OptionalPartitionOperations_EDIT
      }
    }
  | AnyChange OptionalHiveColumn ColumnIdentifier ColumnSpecification OptionalHiveFirstOrAfter_EDIT OptionalHiveCascadeOrRestrict
+ | '<hive>COMPACT' QuotedValue OptionalAndWait OptionalWithOverwriteTblProperties 'CURSOR'
+   {
+     if (!$3 && !$4) {
+       parser.suggestKeywords(['AND WAIT', 'WITH OVERWRITE TBLPROPERTIES']);
+     } else if (!$4) {
+       parser.suggestKeywords(['WITH OVERWRITE TBLPROPERTIES']);
+     }
+   }
+ | '<hive>COMPACT' QuotedValue AndWait_EDIT OptionalWithOverwriteTblProperties
+ | '<hive>COMPACT' QuotedValue OptionalAndWait WithOverwriteTblProperties_EDIT
  | HiveEnableOrDisable 'CURSOR'
    {
      parser.suggestKeywords(['NO_DROP', 'OFFLINE']);
    }
+ | HiveEnableOrDisable HiveNoDropOrOffline_EDIT
  | 'SET' AnyFileFormat 'CURSOR'
    {
      parser.suggestFileFormats();
@@ -396,6 +416,34 @@ OptionalPartitionOperations_EDIT
  | 'SET' '<hive>SERDE' QuotedValue WithSerdeproperties_EDIT
  ;
 
+OptionalAndWait
+ :
+ | 'AND' '<hive>WAIT'
+ ;
+
+AndWait_EDIT
+ : 'AND' 'CURSOR'
+   {
+     parser.suggestKeywords(['WAIT']);
+   }
+ ;
+
+OptionalWithOverwriteTblProperties
+ :
+ | 'WITH' '<hive>OVERWRITE' '<hive>TBLPROPERTIES' ParenthesizedPropertyAssignmentList
+ ;
+
+WithOverwriteTblProperties_EDIT
+ : 'WITH' 'CURSOR'
+   {
+     parser.suggestKeywords(['OVERWRITE TBLPROPERTIES']);
+   }
+ | 'WITH' '<hive>OVERWRITE' 'CURSOR'
+   {
+     parser.suggestKeywords(['TBLPROPERTIES']);
+   }
+ ;
+
 AddReplaceColumns
  : AddOrReplace AnyColumns ParenthesizedColumnSpecificationList OptionalHiveCascadeOrRestrict
  ;
@@ -444,10 +492,12 @@ HiveExchange_EDIT
 
 ExchangePartitionSpec
  : 'PARTITION' '(' OneOrMorePartitionSpecLists ')'
+ | 'PARTITION' '(' PartitionSpecList ')'
  ;
 
 ExchangePartitionSpec_EDIT
  : 'PARTITION' '(' OneOrMorePartitionSpecLists_EDIT RightParenthesisOrError
+ | 'PARTITION' '(' PartitionSpecList_EDIT RightParenthesisOrError
  ;
 
 OneOrMorePartitionSpecLists
@@ -462,6 +512,7 @@ OneOrMorePartitionSpecLists_EDIT
 
 DropOperations
  : 'DROP' OptionalIfExists OneOrMorePartitionSpecs OptionalHivePurge
+ | 'DROP' '<hive>CONSTRAINT' RegularOrBacktickedIdentifier
  | 'DROP' OptionalIfExists '<impala>RANGE'
  | 'DROP' OptionalIfExists '<impala>RANGE' 'PARTITION' RangePartitionSpec
  | 'DROP' OptionalIfExists '<impala>RANGE' '<impala>PARTITION_VALUE' '=' UnsignedValueSpecification
@@ -472,7 +523,7 @@ DropOperations_EDIT
  : 'DROP' OptionalIfExists 'CURSOR'
    {
      if (parser.isHive() && !$2) {
-       parser.suggestKeywords([{ value: 'PARTITION', weight: 1}, { value: 'IF EXISTS', weight: 2 }]);
+       parser.suggestKeywords([{ value: 'CONSTRAINT', weight: 1}, { value: 'PARTITION', weight: 1}, { value: 'IF EXISTS', weight: 2 }]);
      } else if (parser.isHive()) {
         parser.suggestKeywords(['PARTITION']);
      } else if (parser.isImpala() && !$2) {
@@ -489,6 +540,7 @@ DropOperations_EDIT
        parser.suggestKeywords(['PURGE']);
      }
    }
+ | 'DROP' '<hive>CONSTRAINT' 'CURSOR'
  | 'DROP' OptionalIfExists_EDIT
  | 'DROP' OptionalIfExists '<impala>RANGE' 'CURSOR'
    {
@@ -591,10 +643,19 @@ HiveEnableOrDisable
  ;
 
 HiveNoDropOrOffline
- : '<hive>NO_DROP'
+ : '<hive>NO_DROP' OptionalCascade
  | '<hive>OFFLINE'
  ;
 
+HiveNoDropOrOffline_EDIT
+ : '<hive>NO_DROP' OptionalCascade 'CURSOR'
+   {
+     if (!$2) {
+       parser.suggestKeywords(['CASCADE']);
+     }
+   }
+ ;
+
 HiveOrImpalaSerdeproperties
  : '<hive>SERDEPROPERTIES'
  | '<impala>SERDEPROPERTIES'

+ 40 - 23
desktop/core/src/desktop/static/desktop/js/autocomplete/jison/sql_create.jison

@@ -579,8 +579,8 @@ GreaterThanOrError
 ConstraintSpecification
  : ImpalaPrimaryKeySpecification
  | HivePrimaryKeySpecification
- | HiveForeignKeySpecification
- | HivePrimaryKeySpecification ',' HiveForeignKeySpecification
+ | '<hive>CONSTRAINT' RegularOrBacktickedIdentifier HiveForeignKeySpecification
+ | HivePrimaryKeySpecification ',' '<hive>CONSTRAINT' RegularOrBacktickedIdentifier HiveForeignKeySpecification
  ;
 
 ConstraintSpecification_EDIT
@@ -590,10 +590,18 @@ ConstraintSpecification_EDIT
    {
      parser.suggestKeywords(['CONSTRAINT']);
    }
- | HivePrimaryKeySpecification ',' HiveForeignKeySpecification_EDIT
- | HivePrimaryKeySpecification_EDIT ',' HiveForeignKeySpecification
- | HiveForeignKeySpecification_EDIT
- | 'CURSOR' HiveForeignKeySpecification
+ | HivePrimaryKeySpecification ',' '<hive>CONSTRAINT' RegularOrBacktickedIdentifier 'CURSOR'
+   {
+     parser.suggestKeywords(['FOREIGN KEY']);
+   }
+ | HivePrimaryKeySpecification ',' '<hive>CONSTRAINT' RegularOrBacktickedIdentifier HiveForeignKeySpecification_EDIT
+ | HivePrimaryKeySpecification_EDIT ',' '<hive>CONSTRAINT' RegularOrBacktickedIdentifier HiveForeignKeySpecification
+ | '<hive>CONSTRAINT' RegularOrBacktickedIdentifier 'CURSOR'
+   {
+     parser.suggestKeywords(['FOREIGN KEY']);
+   }
+ | '<hive>CONSTRAINT' RegularOrBacktickedIdentifier HiveForeignKeySpecification_EDIT
+ | 'CURSOR' '<hive>CONSTRAINT' RegularOrBacktickedIdentifier HiveForeignKeySpecification
    {
      parser.suggestKeywords(['PRIMARY KEY']);
    }
@@ -618,46 +626,55 @@ HivePrimaryKeySpecification_EDIT
  ;
 
 HiveForeignKeySpecification
- : '<hive>CONSTRAINT' RegularOrBacktickedIdentifier '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList '<hive>REFERENCES' SchemaQualifiedTableIdentifier ParenthesizedColumnList '<hive>DISABLE' '<hive>NOVALIDATE'
+ : '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList '<hive>REFERENCES' SchemaQualifiedTableIdentifier ParenthesizedColumnList '<hive>DISABLE' '<hive>NOVALIDATE' OptionalRelyNoRely
    {
-     parser.addTablePrimary($7);
+     parser.addTablePrimary($5);
    }
  ;
 
 HiveForeignKeySpecification_EDIT
- : '<hive>CONSTRAINT' RegularOrBacktickedIdentifier 'CURSOR'
-   {
-     parser.suggestKeywords(['FOREIGN KEY']);
-   }
- | '<hive>CONSTRAINT' RegularOrBacktickedIdentifier '<hive>FOREIGN' 'CURSOR'
+ : '<hive>FOREIGN' 'CURSOR'
    {
      parser.suggestKeywords(['KEY']);
    }
- | '<hive>CONSTRAINT' RegularOrBacktickedIdentifier '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList_EDIT
- | '<hive>CONSTRAINT' RegularOrBacktickedIdentifier '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList 'CURSOR'
+ | '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList_EDIT
+ | '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList 'CURSOR'
    {
      parser.suggestKeywords(['REFERENCES']);
    }
- | '<hive>CONSTRAINT' RegularOrBacktickedIdentifier '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList '<hive>REFERENCES' 'CURSOR'
+ | '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList '<hive>REFERENCES' 'CURSOR'
    {
      parser.suggestTables();
      parser.suggestDatabases({ appendDot: true });
    }
- | '<hive>CONSTRAINT' RegularOrBacktickedIdentifier '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList '<hive>REFERENCES' SchemaQualifiedTableIdentifier_EDIT
- | '<hive>CONSTRAINT' RegularOrBacktickedIdentifier '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList '<hive>REFERENCES' SchemaQualifiedTableIdentifier ParenthesizedColumnList_EDIT
+ | '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList '<hive>REFERENCES' SchemaQualifiedTableIdentifier_EDIT
+ | '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList '<hive>REFERENCES' SchemaQualifiedTableIdentifier ParenthesizedColumnList_EDIT
    {
-     parser.addTablePrimary($7);
+     parser.addTablePrimary($5);
    }
- | '<hive>CONSTRAINT' RegularOrBacktickedIdentifier '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList '<hive>REFERENCES' SchemaQualifiedTableIdentifier ParenthesizedColumnList 'CURSOR'
+ | '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList '<hive>REFERENCES' SchemaQualifiedTableIdentifier ParenthesizedColumnList 'CURSOR'
    {
-     parser.addTablePrimary($7);
+     parser.addTablePrimary($5);
      parser.suggestKeywords(['DISABLE NOVALIDATE']);
    }
- | '<hive>CONSTRAINT' RegularOrBacktickedIdentifier '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList '<hive>REFERENCES' SchemaQualifiedTableIdentifier ParenthesizedColumnList '<hive>DISABLE' 'CURSOR'
+ | '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList '<hive>REFERENCES' SchemaQualifiedTableIdentifier ParenthesizedColumnList '<hive>DISABLE' 'CURSOR'
    {
-     parser.addTablePrimary($7);
+     parser.addTablePrimary($5);
      parser.suggestKeywords(['NOVALIDATE']);
    }
+ | '<hive>FOREIGN' '<hive>KEY' ParenthesizedColumnList '<hive>REFERENCES' SchemaQualifiedTableIdentifier ParenthesizedColumnList '<hive>DISABLE' '<hive>NOVALIDATE' OptionalRelyNoRely 'CURSOR'
+   {
+     parser.addTablePrimary($5);
+     if (!$9) {
+       parser.suggestKeywords(['NORELY', 'RELY']);
+     }
+   }
+ ;
+
+OptionalRelyNoRely
+ :
+ | '<hive>RELY'
+ | '<hive>NORELY'
  ;
 
 ImpalaPrimaryKeySpecification

Файловите разлики са ограничени, защото са твърде много
+ 3 - 0
desktop/core/src/desktop/static/desktop/js/autocomplete/jison/sql_main.jison


+ 122 - 2
desktop/core/src/desktop/static/desktop/js/autocomplete/spec/sqlSpecAlter.js

@@ -322,7 +322,7 @@
             dialect: 'hive',
             expectedResult: {
               lowerCase: false,
-              suggestKeywords: ['IF NOT EXISTS', 'COLUMNS', 'PARTITION']
+              suggestKeywords: ['IF NOT EXISTS', 'COLUMNS', 'CONSTRAINT', 'PARTITION']
             }
           });
         });
@@ -363,6 +363,54 @@
           });
         });
 
+        it('should suggest keywords for "ALTER TABLE bar ADD CONSTRAINT boo FOREIGN |"', function() {
+          assertAutoComplete({
+            beforeCursor: 'ALTER TABLE bar ADD CONSTRAINT boo FOREIGN ',
+            afterCursor: '',
+            dialect: 'hive',
+            expectedResult: {
+              lowerCase: false,
+              suggestKeywords: ['KEY']
+            }
+          });
+        });
+
+        it('should suggest keywords for "ALTER TABLE bar ADD CONSTRAINT boo FOREIGN KEY (bla) |"', function () {
+          assertAutoComplete({
+            beforeCursor: 'ALTER TABLE bar ADD CONSTRAINT boo FOREIGN KEY (bla) ',
+            afterCursor: '',
+            dialect: 'hive',
+            expectedResult: {
+              lowerCase: false,
+              suggestKeywords: ['REFERENCES']
+            }
+          });
+        });
+
+        it('should suggest keywords for "ALTER TABLE bar ADD CONSTRAINT boo FOREIGN KEY (bla) REFERENCES tbl(col) DISABLE NOVALIDATE |"', function () {
+          assertAutoComplete({
+            beforeCursor: 'ALTER TABLE bar ADD CONSTRAINT boo FOREIGN KEY (bla) REFERENCES tbl(col) DISABLE NOVALIDATE ',
+            afterCursor: '',
+            dialect: 'hive',
+            expectedResult: {
+              lowerCase: false,
+              suggestKeywords: ['NORELY', 'RELY']
+            }
+          });
+        });
+
+        it('should suggest keywords for "ALTER TABLE bar ADD CONSTRAINT boo PRIMARY KEY (id) |"', function() {
+          assertAutoComplete({
+            beforeCursor: 'ALTER TABLE bar ADD CONSTRAINT boo PRIMARY KEY (id) ',
+            afterCursor: '',
+            dialect: 'hive',
+            expectedResult: {
+              lowerCase: false,
+              suggestKeywords: ['DISABLE NOVALIDATE']
+            }
+          });
+        });
+
         it('should suggest keywords for "ALTER TABLE bar ADD IF |"', function() {
           assertAutoComplete({
             beforeCursor: 'ALTER TABLE bar ADD IF ',
@@ -695,7 +743,7 @@
             dialect: 'hive',
             expectedResult: {
               lowerCase: false,
-              suggestKeywords: ['IF EXISTS', 'PARTITION']
+              suggestKeywords: ['IF EXISTS', 'CONSTRAINT', 'PARTITION']
             }
           });
         });
@@ -785,6 +833,18 @@
           });
         });
 
+        it('should suggest keywords for "ALTER TABLE bar EXCHANGE PARTITION (boo=\'baa\') |"', function() {
+          assertAutoComplete({
+            beforeCursor: 'ALTER TABLE bar EXCHANGE PARTITION (boo=\'baa\') ',
+            afterCursor: '',
+            dialect: 'hive',
+            expectedResult: {
+              lowerCase: false,
+              suggestKeywords: ['WITH TABLE']
+            }
+          });
+        });
+
         it('should suggest keywords for "ALTER TABLE bar EXCHANGE PARTITION ((boo=\'baa\'), (baa=\'boo\')) |"', function() {
           assertAutoComplete({
             beforeCursor: 'ALTER TABLE bar EXCHANGE PARTITION ((boo=\'baa\'), (baa=\'boo\')) ',
@@ -872,6 +932,54 @@
           });
         });
 
+        it('should suggest keywords for "ALTER TABLE bar COMPACT \'boo\' |"', function() {
+          assertAutoComplete({
+            beforeCursor: 'ALTER TABLE bar COMPACT \'boo\' ',
+            afterCursor: '',
+            dialect: 'hive',
+            expectedResult: {
+              lowerCase: false,
+              suggestKeywords: ['AND WAIT', 'WITH OVERWRITE TBLPROPERTIES']
+            }
+          });
+        });
+
+        it('should suggest keywords for "ALTER TABLE bar COMPACT \'boo\' AND |"', function() {
+          assertAutoComplete({
+            beforeCursor: 'ALTER TABLE bar COMPACT \'boo\' AND ',
+            afterCursor: '',
+            dialect: 'hive',
+            expectedResult: {
+              lowerCase: false,
+              suggestKeywords: ['WAIT']
+            }
+          });
+        });
+
+        it('should suggest keywords for "ALTER TABLE bar COMPACT \'boo\' WITH |"', function() {
+          assertAutoComplete({
+            beforeCursor: 'ALTER TABLE bar COMPACT \'boo\' WITH ',
+            afterCursor: '',
+            dialect: 'hive',
+            expectedResult: {
+              lowerCase: false,
+              suggestKeywords: ['OVERWRITE TBLPROPERTIES']
+            }
+          });
+        });
+
+        it('should suggest keywords for "ALTER TABLE bar COMPACT \'boo\' WITH OVERWRITE |"', function() {
+          assertAutoComplete({
+            beforeCursor: 'ALTER TABLE bar COMPACT \'boo\' WITH OVERWRITE ',
+            afterCursor: '',
+            dialect: 'hive',
+            expectedResult: {
+              lowerCase: false,
+              suggestKeywords: ['TBLPROPERTIES']
+            }
+          });
+        });
+
         it('should suggest keywords for "ALTER TABLE bar PARTITION (col=\'val\') ADD |"', function() {
           assertAutoComplete({
             beforeCursor: 'ALTER TABLE bar PARTITION (col=\'val\') ADD ',
@@ -1041,6 +1149,18 @@
           });
         });
 
+        it('should suggest keywords for "ALTER TABLE bar PARTITION (col=\'val\') DISABLE NO_DROP |"', function() {
+          assertAutoComplete({
+            beforeCursor: 'ALTER TABLE bar PARTITION (col=\'val\') DISABLE NO_DROP ',
+            afterCursor: '',
+            dialect: 'hive',
+            expectedResult: {
+              lowerCase: false,
+              suggestKeywords: ['CASCADE']
+            }
+          });
+        });
+
         it('should suggest keywords for "ALTER TABLE bar PARTITION (col=\'val\') ENABLE |"', function() {
           assertAutoComplete({
             beforeCursor: 'ALTER TABLE bar PARTITION (col=\'val\') ENABLE ',

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/autocomplete/sqlAutocompleteParser.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/autocomplete/sqlSyntaxParser.js


Някои файлове не бяха показани, защото твърде много файлове са промени