pvary commented on code in PR #3888:
URL: https://github.com/apache/hive/pull/3888#discussion_r1063146796
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java:
##########
@@ -187,6 +187,16 @@ public void alterTable(RawStore msdb, Warehouse wh, String
catName, String dbnam
TableName.getQualified(catName, dbname, name) + " doesn't exist");
}
+ String expectedKey = environmentContext != null &&
environmentContext.getProperties() != null ?
+
environmentContext.getProperties().get(hive_metastoreConstants.EXPECTED_PARAMETER_KEY)
: null;
+ String expectedValue = environmentContext != null &&
environmentContext.getProperties() != null ?
+
environmentContext.getProperties().get(hive_metastoreConstants.EXPECTED_PARAMETER_VALUE)
: null;
+ if (expectedKey != null && expectedValue != null
+ && !expectedValue.equals(oldt.getParameters().get(expectedKey)))
{
+ throw new MetaException("The table has been modified. The parameter
value for key '" + expectedKey + "' is '"
Review Comment:
This is the relevant code part:
```
msdb.openTransaction(Constants.TX_REPEATABLE_READ)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]