Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -143,7 +143,7 @@ private String createTableWithTTL(int ttl) throws SQLException, InterruptedExcep
try (Connection conn = DriverManager.getConnection(getUrl())) {
conn.createStatement()
.execute(String.format("CREATE TABLE %s" +
"(k VARCHAR PRIMARY KEY, v VARCHAR) %s", fullTableName, ddlOptions));
"(k VARCHAR PRIMARY KEY, f.v VARCHAR) %s", fullTableName, ddlOptions));
conn.createStatement().execute("UPSERT INTO " + fullTableName + " VALUES('a','aa')");
conn.createStatement().execute("UPSERT INTO " + fullTableName + " VALUES('b','bb')");
conn.createStatement().execute("UPSERT INTO " + fullTableName + " VALUES('c','cc')");
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -191,10 +191,13 @@ private void verifySCN() throws SQLException {
//we can have a tableRef with an empty table, such as with sequences
if (tableQualifier.length > 0) {
HTableDescriptor td = conn.getQueryServices().getTableDescriptor(tableQualifier);
HColumnDescriptor cd = td.getFamily(QueryConstants.DEFAULT_COLUMN_FAMILY_BYTES);
HColumnDescriptor[] cds = td.getColumnFamilies();
now = EnvironmentEdgeManager.currentTimeMillis();
if (now - cd.getTimeToLive() * 1000L > scn) {
scnTooOldTableRefs.add(tableRef);
if (cds.length > 0){
//Phoenix only allows a single table level TTL, so any CF will do
if (now - cds[0].getTimeToLive() * 1000L > scn) {
scnTooOldTableRefs.add(tableRef);
}
}
}
}
Expand Down