tkhurana commented on code in PR #1595:
URL: https://github.com/apache/phoenix/pull/1595#discussion_r1183120139


##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java:
##########
@@ -1435,4 +1440,52 @@ public void testReturnedTimestamp() throws Exception {
         }
     }
 
+    /**
+     * Tests that we add LAST_DDL_TIMESTAMP when we create an index and we 
update LAST_DDL_TIMESTAMP when we update
+     * an index.
+     * @throws Exception
+     */
+    @Test
+    public void testLastDDLTimestampOnIndexes() throws Exception {
+        Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+        String tableName = "TBL_" + generateUniqueName();
+        String indexName = "IND_" + generateUniqueName();
+        String fullTableName = 
SchemaUtil.getTableName(TestUtil.DEFAULT_SCHEMA_NAME, tableName);
+        String fullIndexName = 
SchemaUtil.getTableName(TestUtil.DEFAULT_SCHEMA_NAME, indexName);
+
+        String ddl ="CREATE TABLE " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions;
+        try (Connection conn = DriverManager.getConnection(getUrl(), props)) {
+            conn.setAutoCommit(true);
+            Statement stmt = conn.createStatement();
+            stmt.execute(ddl);
+            ddl = "CREATE " + (localIndex ? "LOCAL" : "") + (uncovered ? 
"UNCOVERED" : "")

Review Comment:
   Good to test the async index creation code path which first creates the 
index in building state and then call IndexTool to build the index which makes 
the index active. For example:



-- 
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]

Reply via email to