[
https://issues.apache.org/jira/browse/PHOENIX-6932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17718751#comment-17718751
]
ASF GitHub Bot commented on PHOENIX-6932:
-----------------------------------------
shahrs87 commented on code in PR #1595:
URL: https://github.com/apache/phoenix/pull/1595#discussion_r1183123347
##########
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:
@tkhurana For example?
> Update LAST_DDL_TIMESTAMP for index table when add/drop/alter indexes.
> ----------------------------------------------------------------------
>
> Key: PHOENIX-6932
> URL: https://issues.apache.org/jira/browse/PHOENIX-6932
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: Rushabh Shah
> Assignee: Rushabh Shah
> Priority: Major
>
> Currently we use LAST_DDL_TIMESTAMP only for data tables.
> Create LAST_DDL_TIMESTAMP when we create an index.
> Update LAST_DDL_TIMESTAMP when we alter index like disable, rebuild,
> unusable, usable.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)