yanxinyi commented on a change in pull request #724: PHOENIX-5629 Phoenix
Function to Return HBase row timestamp
URL: https://github.com/apache/phoenix/pull/724#discussion_r389222892
##########
File path:
phoenix-core/src/it/java/org/apache/phoenix/end2end/PhoenixRowTimestampFunctionIT.java
##########
@@ -191,4 +192,158 @@ public void testRowTimestampColumn() throws Exception {
}
}
+ @Test
+ public void testRowTimestampColumnAndPredicates() throws Exception {
+ String tableName = generateUniqueName();
+ try (Connection conn = DriverManager.getConnection(getUrl())) {
+ String ddl = "CREATE TABLE IF NOT EXISTS " + tableName
+ + " (PK1 INTEGER NOT NULL, PK2 DATE NOT NULL, KV1 VARCHAR,
KV2 VARCHAR"
+ + " CONSTRAINT PK PRIMARY KEY(PK1, PK2))" +
this.tableDDLOptions;
+ conn.createStatement().execute(ddl);
+
+ String dml = "UPSERT INTO " + tableName + " (PK1, PK2, KV1, KV2)
VALUES (?, ?, ?, ?)";
+
+ long rowTimestamp = EnvironmentEdgeManager.currentTimeMillis();
+ Date rowTimestampDate1 = new Date(rowTimestamp - 120000);
Review comment:
why 120000? some random number? can you make it as constant?
----------------------------------------------------------------
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