sankarh commented on a change in pull request #1237:
URL: https://github.com/apache/hive/pull/1237#discussion_r494037934
##########
File path:
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java
##########
@@ -3236,13 +3236,29 @@ public void testConstraints() throws IOException {
List<SQLNotNullConstraint> nns =
metaStoreClientMirror.getNotNullConstraints(new
NotNullConstraintsRequest(DEFAULT_CATALOG_NAME, replDbName , "tbl6"));
assertEquals(nns.size(), 1);
nnName = nns.get(0).getNn_name();
- List<SQLCheckConstraint> cks =
metaStoreClientMirror.getCheckConstraints(new
CheckConstraintsRequest(DEFAULT_CATALOG_NAME, replDbName , "tbl9"));
+ List<SQLCheckConstraint> cks =
metaStoreClientMirror.getCheckConstraints(new
CheckConstraintsRequest(DEFAULT_CATALOG_NAME, replDbName, "tbl9"));
assertEquals(cks.size(), 2);
ckName1 = cks.get(0).getDc_name();
ckName2 = cks.get(1).getDc_name();
- List<SQLDefaultConstraint> dks =
metaStoreClientMirror.getDefaultConstraints(new
DefaultConstraintsRequest(DEFAULT_CATALOG_NAME, replDbName , "tbl10"));
+ List<SQLDefaultConstraint> dks =
metaStoreClientMirror.getDefaultConstraints(new
DefaultConstraintsRequest(DEFAULT_CATALOG_NAME, replDbName, "tbl10"));
assertEquals(dks.size(), 1);
- dkName = dks.get(0).getDc_name();
+ dkName1 = dks.get(0).getDc_name();
+ } catch (TException te) {
+ assertNull(te);
+ }
+
+ String dkName2 = "custom_dk_name";
+ String ckName3 = "customer_ck_name";
+ run("ALTER TABLE " + dbName+ ".tbl10 CHANGE COLUMN a a string CONSTRAINT "
+ ckName3 + " CHECK (a like 'a%')", driver);
Review comment:
nit: Add space before "+" in both lines.
----------------------------------------------------------------
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]