haridsv commented on code in PR #1964:
URL: https://github.com/apache/phoenix/pull/1964#discussion_r1769486436
##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/CDCQueryIT.java:
##########
@@ -701,12 +660,143 @@ public void testSelectCDCFailDataTableUpdate() throws
Exception {
long startTS = System.currentTimeMillis();
generateChanges(startTS, tenantids, tableName, null,
- COMMIT_FAILURE_EXPECTED);
+ COMMIT_FAILURE_EXPECTED, "v3");
try (Connection conn = newConnection(tenantId)) {
ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM
" +
SchemaUtil.getTableName(schemaName, cdcName));
assertEquals(false, rs.next());
+
+ }
+ }
+
+ @Test
+ public void testCDCIndexBuildAndVerification() throws Exception {
+ String schemaName = withSchemaName ? generateUniqueName() : null;
+ String tableName = generateUniqueName();
+ String tableFullName = SchemaUtil.getTableName(schemaName, tableName);
+ String cdcName, cdc_sql;
+ try (Connection conn = newConnection()) {
+ // Create a table and add some rows
+ createTable(conn, "CREATE TABLE " + tableFullName + " (" +
(multitenant ?
+ "TENANT_ID CHAR(5) NOT NULL, " :
+ "")
+ + "k INTEGER NOT NULL, v1 INTEGER, v1v2 INTEGER, v2
INTEGER, B.vb INTEGER, "
+ + "v3 INTEGER, CONSTRAINT PK PRIMARY KEY " + (multitenant ?
+ "(TENANT_ID, k) " :
+ "(k)") + ")", encodingScheme, multitenant,
tableSaltBuckets, false, null);
+ if (forView) {
+ String viewName = generateUniqueName();
+ String viewFullName = SchemaUtil.getTableName(schemaName,
viewName);
+ createTable(conn, "CREATE VIEW " + viewFullName + " AS SELECT
* FROM " + tableFullName,
+ encodingScheme);
+ tableName = viewName;
+ tableFullName = viewFullName;
+ }
+
+ String tenantId = multitenant ? "1000" : null;
+ String[] tenantids = { tenantId };
+ if (multitenant) {
+ tenantids = new String[] { tenantId, "2000" };
+ }
+
+ long startTS = System.currentTimeMillis();
+ generateChanges(startTS, tenantids, tableFullName, tableFullName,
COMMIT_SUCCESS, null);
Review Comment:
I am not clear what you mean, `generateMutations` is the newer method but
you are using the older `generateChanges`.
--
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]