alpass163 commented on code in PR #18874:
URL: https://github.com/apache/iotdb/pull/18874#discussion_r4311418488
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/DataNodeInternalRPCServiceImpl.java:
##########
@@ -2890,6 +2902,24 @@ public TSStatus updateTemplate(final TUpdateTemplateReq
req) {
SchemaEngine.getInstance()
.updateSubtreeMeasurementCountForTemplate(newTemplate.getId(),
delta);
}
+ if (TreeToTableViewCache.getInstance().hasView()) {
+ // addViewColumnsIfNeeded, which collects the views from the index
and asks CN to add the
+ // columns.
+ try {
+ final Map<PartialPath, List<Pair<String, TSDataType>>>
device2Measurements =
+ collectDevicesUsingExtendedTemplate(oldTemplate, newTemplate);
+ TriggerAddViewColumnVisitor.addViewColumnsIfNeeded(
+ device2Measurements, ALTER_DEVICE_TEMPLATE_ID_PREFIX +
newTemplate.getId());
Review Comment:
fixed it
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]