yanxinyi commented on a change in pull request #766: Initial checkin for 
PHOENIX-5821
URL: https://github.com/apache/phoenix/pull/766#discussion_r410829151
 
 

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/util/ViewUtil.java
 ##########
 @@ -629,4 +631,37 @@ public static void 
addTagsToPutsForViewAlteredProperties(List<Mutation> tableMet
 
         }
     }
+
+    public static ParseNode getViewWhereWithViewTTL(StatementContext context, 
PTable table)
+            throws SQLException {
+        ParseNode viewWhere = null;
+
+        Long nowTS = context.getConnection().getSCN() == null ?
+                EnvironmentEdgeManager.currentTimeMillis() : 
context.getConnection().getSCN();
+        String viewStatement = null;
+        String viewTTLFilterClause = String.format(
+                "((%d - TO_NUMBER(phoenix_row_timestamp())) < %d)", nowTS, 
table.getViewTTL());
 
 Review comment:
   same here. If phoenix row ts is getting server-side ts, it's better to 
compare with server-side ts instead of client-side  

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

Reply via email to