ChinmaySKulkarni commented on a change in pull request #599: Create columns in 
SYSCAT and fields in PTable.proto for view TTL support
URL: https://github.com/apache/phoenix/pull/599#discussion_r336662931
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
 ##########
 @@ -2112,6 +2116,17 @@ private PTable createTableInternal(CreateTableStatement 
statement, byte[][] spli
             if (tableType != PTableType.INDEX && updateCacheFrequencyProp != 
null) {
                 updateCacheFrequency = updateCacheFrequencyProp;
             }
+
+            Integer viewTTL = null;
+            Long viewTTLHighWaterMark = null;
+            Integer viewTTLProp = null;
+
+            //TODO Look at the VIEW_TTL table property values that are set 
instead of hardcoded defaults.
+            if 
(!SchemaUtil.isSystemTable(Bytes.toBytes(SchemaUtil.getTableName(schemaName, 
tableName))) && viewTTLProp != null) {
+                viewTTL = HConstants.FOREVER;
+                viewTTLHighWaterMark = 0L;
+            }
 
 Review comment:
   Also, we would need some sanity checks for the passed in viewTTL and 
viewTTLHWM properties, for example: cannot be negative, some possible max 
value, etc.

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