@Override
  protected void serializeAttributes(DataOutputStream stream) throws IOException {
    PlanNodeType.SERIES_SCHEMA_FETCH_SCAN.serialize(stream);
    storageGroup.serialize(stream);
    patternTree.serialize(stream);
    ReadWriteIOUtils.write(templateMap.size(), stream);
    for (Template template : templateMap.values()) {
      template.serialize(stream);
    }
    ReadWriteIOUtils.write(withTags, stream);
    ReadWriteIOUtils.write(withAttributes, stream);
    ReadWriteIOUtils.write(withTemplate, stream);
    ReadWriteIOUtils.write(withAliasForce, stream);
  }
This class defines the scan task of schema fetcher.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/metadata/read/SeriesSchemaFetchScanNode.java