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_r350972240
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
 ##########
 @@ -1987,10 +1993,37 @@ private PTable 
createTableInternal(CreateTableStatement statement, byte[][] spli
             int baseTableColumnCount =
                     tableType == PTableType.VIEW ? parent.getColumns().size()
                             : QueryConstants.BASE_TABLE_BASE_COLUMN_COUNT;
+
+            Long viewTTL = VIEW_TTL_NOT_DEFINED;
+            Long viewTTLHighWaterMark = MIN_VIEW_TTL_HWM;
+            Long viewTTLProp = (Long) 
TableProperty.VIEW_TTL.getValue(tableProps);;
+
+            if (tableType == VIEW && viewTTLProp != null && parentPhysicalName 
!= null) {
 
 Review comment:
   @jpisaac Shouldn't we also do some checks on the actual value of the 
`viewTTLProp` provided by the user, such as checking that it is non-negative, 
other bounds, 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