private IMeasurementSchemaInfo getMeasurementSchemaInfo(
      SchemaEntityNode entityNode, String measurement) {
    SchemaNode node = entityNode.getChild(measurement);
    if (node != null && node.isMeasurement()) {
      return node.getAsMeasurementNode();
    } else {
      Template template = templateMap.get(entityNode.getTemplateId());
      if (template != null && template.getSchemaMap().containsKey(measurement)) {
        return new MeasurementSchemaInfo(
            measurement, template.getSchema(measurement), null, null, null);
      }
    }
    return null;
  }
Get measurement schema info from entity node children or template.

@param entityNode entity node
@param measurement measurement name
@return measurement schema info, null if not found
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/schematree/ClusterSchemaTree.java