gjacoby126 commented on a change in pull request #935: URL: https://github.com/apache/phoenix/pull/935#discussion_r521480773
########## File path: phoenix-core/src/main/java/org/apache/phoenix/coprocessor/AddColumnMutator.java ########## @@ -399,6 +401,19 @@ public MetaDataMutationResult validateAndAddMetadata(PTable table, byte[][] rowK rowKeyMetaData[TABLE_NAME_INDEX]))); } } + if (isAddingColumns) { + //We're changing the application-facing schema by adding a column, so update the DDL + // timestamp + long serverTimestamp = EnvironmentEdgeManager.currentTimeMillis(); + additionalTableMetadataMutations.add(MetaDataUtil.getLastDDLTimestampUpdate(tableHeaderRowKey, + clientTimeStamp, serverTimestamp)); + for (PTable viewTable : childViews) { Review comment: @ChinmaySKulkarni - I see how inheritance logic could work for PTables, but how would we make that work for the JDBC metadata API? (see PhoenixDatabaseMetaData) I'm asserting throughout my tests that PTables and the metadata API give the same answers, but the metadata API is, I believe, just querying the table or view header row in System.Catalog. (_Technically_, the JDBC metadata API is the "public" one and the PTables API is the "private" one, though in all the external Phoenix-based applications I work with for my day job, I've switched to using PTables because the JDBC metadata API is just too inefficient since it never caches results.) Also just want to note that in a follow-up JIRA to this, we're going to need to (optionally) call to an external schema registry when we create a table/view or add/remove a column from a table/view, and that _will_ need to be synchronous, because the schema needs to be in the schema registry before DML using that schema starts being processed by the replication pipeline. ---------------------------------------------------------------- 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: us...@infra.apache.org