File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed
catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser
compatibility/src/test/scala/org/apache/spark/sql/hive/execution
src/test/scala/org/apache/spark/sql/hive/execution Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ hiveNativeCommands
149149 | ROLLBACK WORK ?
150150 | SHOW PARTITIONS tableIdentifier partitionSpec?
151151 | DFS .*?
152- | (CREATE | ALTER | DROP | SHOW | DESC | DESCRIBE | LOCK | UNLOCK | MSCK | LOAD ) .*?
152+ | (CREATE | ALTER | DROP | SHOW | DESC | DESCRIBE | MSCK | LOAD ) .*?
153153 ;
154154
155155unsupportedHiveNativeCommands
@@ -171,9 +171,11 @@ unsupportedHiveNativeCommands
171171 | kw1=SHOW kw2=LOCKS
172172 | kw1=CREATE kw2=INDEX
173173 | kw1=DROP kw2=INDEX
174+ | kw1=ALTER kw2=INDEX
174175 | kw1=LOCK kw2=TABLE
176+ | kw1=LOCK kw2=DATABASE
175177 | kw1=UNLOCK kw2=TABLE
176- | kw1=ALTER kw2=INDEX
178+ | kw1=UNLOCK kw2=DATABASE
177179 ;
178180
179181createTableHeader
@@ -648,7 +650,7 @@ nonReserved
648650 | INPUTDRIVER | OUTPUTDRIVER | DBPROPERTIES | DFS | TRUNCATE | METADATA | REPLICATION | COMPUTE
649651 | STATISTICS | ANALYZE | PARTITIONED | EXTERNAL | DEFINED | RECORDWRITER
650652 | REVOKE | GRANT | LOCK | UNLOCK | MSCK | EXPORT | IMPORT | LOAD | VALUES | COMMENT | ROLE
651- | ROLES | COMPACTIONS | PRINCIPALS | TRANSACTIONS | INDEXES | LOCKS | OPTION
653+ | ROLES | COMPACTIONS | PRINCIPALS | TRANSACTIONS | INDEX | INDEXES | LOCKS | OPTION
652654 ;
653655
654656SELECT : ' SELECT' ;
Original file line number Diff line number Diff line change @@ -352,7 +352,12 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
352352 " show_create_table_index" ,
353353 " show_create_table_partitioned" ,
354354 " show_create_table_serde" ,
355- " show_create_table_view"
355+ " show_create_table_view" ,
356+
357+ // Index commands are not supported
358+ " drop_index" ,
359+ " drop_index_removes_partition_dirs" ,
360+ " alter_index"
356361 )
357362
358363 /**
@@ -369,7 +374,6 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
369374 " alter3" ,
370375 " alter4" ,
371376 " alter5" ,
372- " alter_index" ,
373377 " alter_merge_2" ,
374378 " alter_partition_format_loc" ,
375379 " alter_partition_with_whitelist" ,
@@ -496,8 +500,6 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
496500 " distinct_stats" ,
497501 " drop_database_removes_partition_dirs" ,
498502 " drop_function" ,
499- " drop_index" ,
500- " drop_index_removes_partition_dirs" ,
501503 " drop_multi_partitions" ,
502504 " drop_partitions_filter" ,
503505 " drop_partitions_filter2" ,
Original file line number Diff line number Diff line change @@ -1280,9 +1280,11 @@ class HiveQuerySuite extends HiveComparisonTest with BeforeAndAfter {
12801280 assertUnsupportedFeature { sql(" SHOW LOCKS my_table" ) }
12811281 }
12821282
1283- test(" lock/unlock table commands are not supported" ) {
1283+ test(" lock/unlock table and database commands are not supported" ) {
12841284 assertUnsupportedFeature { sql(" LOCK TABLE my_table SHARED" ) }
12851285 assertUnsupportedFeature { sql(" UNLOCK TABLE my_table" ) }
1286+ assertUnsupportedFeature { sql(" LOCK DATABASE my_db SHARED" ) }
1287+ assertUnsupportedFeature { sql(" UNLOCK DATABASE my_db" ) }
12861288 }
12871289
12881290 test(" create/drop/alter index commands are not supported" ) {
You can’t perform that action at this time.
0 commit comments