adesh-rao commented on a change in pull request #1237:
URL: https://github.com/apache/hive/pull/1237#discussion_r492641417
##########
File path:
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java
##########
@@ -3195,13 +3201,17 @@ public void testConstraints() throws IOException {
assertEquals(fks.size(), 2);
List<SQLNotNullConstraint> nns =
metaStoreClientMirror.getNotNullConstraints(new
NotNullConstraintsRequest(DEFAULT_CATALOG_NAME, replDbName , "tbl3"));
assertEquals(nns.size(), 1);
+ List<SQLCheckConstraint> cks =
metaStoreClientMirror.getCheckConstraints(new
CheckConstraintsRequest(DEFAULT_CATALOG_NAME, replDbName , "tbl7"));
+ assertEquals(cks.size(), 2);
} catch (TException te) {
assertNull(te);
}
run("CREATE TABLE " + dbName + ".tbl4(a string, b string, primary key (a,
b) disable novalidate rely)", driver);
run("CREATE TABLE " + dbName + ".tbl5(a string, b string, foreign key (a,
b) references " + dbName + ".tbl4(a, b) disable novalidate)", driver);
run("CREATE TABLE " + dbName + ".tbl6(a string, b string not null disable,
unique (a) disable)", driver);
+ run("CREATE TABLE " + dbName + ".tbl9(a string CHECK (a like 'a%'), price
double CHECK (price > 0 AND price <= 1000))", driver);
+ run("CREATE TABLE " + dbName + ".tbl10(a string, b int DEFAULT 0)",
driver);
Review comment:
Alter table can either add or drop the constraints. Since the drop was
already there, I have added through alter too.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]