@Override
  public DeviceSchemaInfo searchDeviceSchemaInfo(
      PartialPath devicePath, List<String> measurements) {

    String[] nodes = devicePath.getNodes();
    SchemaNode cur = root;
    for (int i = 1; i < nodes.length; i++) {
      if (cur == null) {
        return null;
      }
      cur = cur.getChild(nodes[i]);
    }

    if (cur == null || !cur.isEntity()) {
      return null;
    }
    SchemaEntityNode entityNode = cur.getAsEntityNode();
    List<IMeasurementSchemaInfo> measurementSchemaInfoList = new ArrayList<>();
    for (String measurement : measurements) {
      measurementSchemaInfoList.add(getMeasurementSchemaInfo(entityNode, measurement));
    }

    return new DeviceSchemaInfo(
        devicePath, entityNode.isAligned(), entityNode.getTemplateId(), measurementSchemaInfoList);
  }
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