Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ hiveNativeCommands
| ROLLBACK WORK?
| SHOW PARTITIONS tableIdentifier partitionSpec?
| DFS .*?
| (CREATE | ALTER | DROP | SHOW | DESC | DESCRIBE | LOCK | UNLOCK | MSCK | LOAD) .*?
| (CREATE | ALTER | DROP | SHOW | DESC | DESCRIBE | MSCK | LOAD) .*?
;

unsupportedHiveNativeCommands
Expand All @@ -169,6 +169,13 @@ unsupportedHiveNativeCommands
| kw1=SHOW kw2=TRANSACTIONS
| kw1=SHOW kw2=INDEXES
| kw1=SHOW kw2=LOCKS
| kw1=CREATE kw2=INDEX
| kw1=DROP kw2=INDEX
| kw1=ALTER kw2=INDEX
| kw1=LOCK kw2=TABLE
| kw1=LOCK kw2=DATABASE
| kw1=UNLOCK kw2=TABLE
| kw1=UNLOCK kw2=DATABASE
;

createTableHeader
Expand Down Expand Up @@ -643,7 +650,7 @@ nonReserved
| INPUTDRIVER | OUTPUTDRIVER | DBPROPERTIES | DFS | TRUNCATE | METADATA | REPLICATION | COMPUTE
| STATISTICS | ANALYZE | PARTITIONED | EXTERNAL | DEFINED | RECORDWRITER
| REVOKE | GRANT | LOCK | UNLOCK | MSCK | EXPORT | IMPORT | LOAD | VALUES | COMMENT | ROLE
| ROLES | COMPACTIONS | PRINCIPALS | TRANSACTIONS | INDEXES | LOCKS | OPTION
| ROLES | COMPACTIONS | PRINCIPALS | TRANSACTIONS | INDEX | INDEXES | LOCKS | OPTION
;

SELECT: 'SELECT';
Expand Down Expand Up @@ -863,6 +870,7 @@ ROLES: 'ROLES';
COMPACTIONS: 'COMPACTIONS';
PRINCIPALS: 'PRINCIPALS';
TRANSACTIONS: 'TRANSACTIONS';
INDEX: 'INDEX';
INDEXES: 'INDEXES';
LOCKS: 'LOCKS';
OPTION: 'OPTION';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,12 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"show_create_table_index",
"show_create_table_partitioned",
"show_create_table_serde",
"show_create_table_view"
"show_create_table_view",

// Index commands are not supported
"drop_index",
"drop_index_removes_partition_dirs",
"alter_index"
)

/**
Expand All @@ -369,7 +374,6 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"alter3",
"alter4",
"alter5",
"alter_index",
"alter_merge_2",
"alter_partition_format_loc",
"alter_partition_with_whitelist",
Expand Down Expand Up @@ -496,8 +500,6 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"distinct_stats",
"drop_database_removes_partition_dirs",
"drop_function",
"drop_index",
"drop_index_removes_partition_dirs",
"drop_multi_partitions",
"drop_partitions_filter",
"drop_partitions_filter2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,21 @@ class HiveQuerySuite extends HiveComparisonTest with BeforeAndAfter {
assertUnsupportedFeature { sql("SHOW LOCKS my_table") }
}

test("lock/unlock table and database commands are not supported") {
assertUnsupportedFeature { sql("LOCK TABLE my_table SHARED") }
assertUnsupportedFeature { sql("UNLOCK TABLE my_table") }
assertUnsupportedFeature { sql("LOCK DATABASE my_db SHARED") }
assertUnsupportedFeature { sql("UNLOCK DATABASE my_db") }
}

test("create/drop/alter index commands are not supported") {
assertUnsupportedFeature {
sql("CREATE INDEX my_index ON TABLE my_table(a) as 'COMPACT' WITH DEFERRED REBUILD")}
assertUnsupportedFeature { sql("DROP INDEX my_index ON my_table") }
assertUnsupportedFeature { sql("ALTER INDEX my_index ON my_table REBUILD")}
assertUnsupportedFeature {
sql("ALTER INDEX my_index ON my_table set IDXPROPERTIES (\"prop1\"=\"val1_new\")")}
}
}

// for SPARK-2180 test
Expand Down