Will Berkeley has uploaded this change for review. ( http://gerrit.cloudera.org:8080/8188
Change subject: KUDU-2132 Error dropping columns renamed to old key column names ...................................................................... KUDU-2132 Error dropping columns renamed to old key column names Suppose a table has two columns 'a' and 'b', and 'a' is the primary key. Consider the following sequence of alter table steps, done as part of one alter table request: 1. Rename the key column 'a' to 'c'. 2. Rename 'b' to 'a', the previous name of the key column. 3. Drop 'a'. This is a valid sequence, but previously we were rejecting it, saying that a primary key column was being dropped, even though that isn't the case. The problem is that CatalogManager::ApplyAlterSchemaSteps checked whether a column was a key column by checking by name against the table's schema before any alter steps were applied. The fix is to check against the schema with the previous alter steps applied. Change-Id: Ie27f7aa936e6dfcf6c8b0b7a701784b0683680f2 --- M src/kudu/common/schema.h M src/kudu/integration-tests/alter_table-test.cc M src/kudu/master/catalog_manager.cc 3 files changed, 22 insertions(+), 1 deletion(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/88/8188/1 -- To view, visit http://gerrit.cloudera.org:8080/8188 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie27f7aa936e6dfcf6c8b0b7a701784b0683680f2 Gerrit-Change-Number: 8188 Gerrit-PatchSet: 1 Gerrit-Owner: Will Berkeley <wdberke...@gmail.com>