gjacoby126 commented on a change in pull request #935:
URL: https://github.com/apache/phoenix/pull/935#discussion_r513080213
##########
File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/ViewIT.java
##########
@@ -387,6 +388,31 @@ public void testViewUsesTableLocalIndex() throws Exception
{
}
}
+ @Test
+ public void testCreateViewTimestamp() throws Exception {
+ Properties props = new Properties();
+ final String schemaName = "S_" + generateUniqueName();
+ final String tableName = "T_" + generateUniqueName();
+ final String viewName = "V_" + generateUniqueName();
+ final String dataTableFullName = SchemaUtil.getTableName(schemaName,
tableName);
+ final String viewFullName = SchemaUtil.getTableName(schemaName,
viewName);
+ String tableDDL =
+ "CREATE TABLE " + dataTableFullName + " (\n" + "ID1 VARCHAR(15)
NOT NULL,\n"
+ + "ID2 VARCHAR(15) NOT NULL,\n" + "CREATED_DATE DATE,\n"
+ + "CREATION_TIME BIGINT,\n" + "LAST_USED DATE,\n"
+ + "CONSTRAINT PK PRIMARY KEY (ID1, ID2)) ";
+ String viewDDL = "CREATE VIEW " + viewFullName + " AS SELECT * " +
+ "FROM " + dataTableFullName;
+ long startTS = EnvironmentEdgeManager.currentTimeMillis();
+ try (Connection conn = DriverManager.getConnection(getUrl(), props)) {
+ conn.createStatement().execute(tableDDL);
+ conn.createStatement().execute(viewDDL);
+ conn.commit();
Review comment:
Done
----------------------------------------------------------------
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]