gokceni commented on a change in pull request #704: PHOENIX-5713: Incorrectly
handled view and view indexes with/without …
URL: https://github.com/apache/phoenix/pull/704#discussion_r374809473
##########
File path:
phoenix-core/src/it/java/org/apache/phoenix/end2end/NonParameterizedIndexScrutinyToolIT.java
##########
@@ -156,20 +159,63 @@ public void testScrutinyOnRowsNearExpiry() throws
Exception {
try (Connection conn =
DriverManager.getConnection(getUrl(),
PropertiesUtil.deepCopy(TEST_PROPERTIES))) {
- conn.createStatement().execute(String.format(dataTableDDL,
dataTableName));
+ conn.createStatement().execute(String.format(dataTableDDL,
dataTableFullName));
conn.createStatement().execute(String.format(indexTableDDL,
indexTableName,
- dataTableName));
+ dataTableFullName));
// insert two rows
PreparedStatement
upsertDataStmt =
conn.prepareStatement(String.format(upsertData,
- dataTableName));
+ dataTableFullName));
EnvironmentEdgeManager.injectEdge(testClock);
upsertRow(upsertDataStmt, 1, "name-1", 98051);
upsertRow(upsertDataStmt, 2, "name-2", 98052);
conn.commit();
- List<Job> completedJobs = runScrutiny(null, dataTableName,
indexTableName);
+ List<Job> completedJobs = runScrutiny(schema, dataTableName,
indexTableName);
+ Job job = completedJobs.get(0);
+ assertTrue(job.isSuccessful());
+ Counters counters = job.getCounters();
+ assertEquals(2, getCounterValue(counters, EXPIRED_ROW_COUNT));
+ assertEquals(0, getCounterValue(counters, VALID_ROW_COUNT));
+ assertEquals(0, getCounterValue(counters, INVALID_ROW_COUNT));
+ }
+ }
+
+ @Test
+ public void testScrutinyOnRowsNearExpiry_viewIndex() throws Exception {
+ String schemaName = "S"+generateUniqueName();
+ String dataTableName = "T"+generateUniqueName();
+ String dataTableFullName =
SchemaUtil.getTableName(schemaName,dataTableName);
+ String viewIndexName = "VI"+generateUniqueName();
+ String viewName = "V"+generateUniqueName();
Review comment:
Nit: spacing between + and recommend adding it like "V_" +
----------------------------------------------------------------
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]
With regards,
Apache Git Services