@Override
    public SchemaRegionPlanSerializationResult visitCreateLogicalView(
        final ICreateLogicalViewPlan createLogicalViewPlan,
        final DataOutputStream dataOutputStream) {
      try {
        final int viewSize = createLogicalViewPlan.getViewSize();
        // serialize size of views
        dataOutputStream.writeInt(viewSize);
        final List<PartialPath> viewPAthList = createLogicalViewPlan.getViewPathList();
        final Map<PartialPath, ViewExpression> viewPathToSourceMap =
            createLogicalViewPlan.getViewPathToSourceExpressionMap();
        for (int i = 0; i < viewSize; i++) {
          final PartialPath thisPath = viewPAthList.get(i);
          final ViewExpression thisExp = viewPathToSourceMap.get(thisPath);
          // for each view, serialize info of it
          final byte[] bytes = thisPath.getFullPath().getBytes();
          dataOutputStream.writeInt(bytes.length);
          dataOutputStream.write(bytes);
          ViewExpression.serialize(thisExp, dataOutputStream);
        }
        return SchemaRegionPlanSerializationResult.SUCCESS;
      } catch (final IOException e) {
        return new SchemaRegionPlanSerializationResult(e);
      }
    }
This class provides the ability to serialize the given SchemaRegionPlan into binary data, which
is compatible with that of PhysicalPlan in 0.14 snapshot versions.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/logfile/visitor/SchemaRegionPlanSerializer.java