private void addAlignedTimeSeriesToBatchStatement(
      final CreateAlignedTimeSeriesStatement statement,
      final InternalCreateMultiTimeSeriesStatement internalCreateMultiTimeSeriesStatement) {
    final MeasurementGroup group =
        internalCreateMultiTimeSeriesStatement
            .getDeviceMap()
            .computeIfAbsent(
                statement.getDevicePath(), devicePath -> new Pair<>(true, new MeasurementGroup()))
            .getRight();
    for (int i = 0; i < statement.getMeasurements().size(); ++i) {
      if (group.addMeasurement(
          statement.getMeasurements().get(i),
          statement.getDataTypes().get(i),
          statement.getEncodings().get(i),
          statement.getCompressors().get(i))) {
        group.addProps(new HashMap<>());
        // Non-null lists
        group.addTags(statement.getTagsList().get(i));
        group.addAttributes(statement.getAttributesList().get(i));
        group.addAlias(statement.getAliasList().get(i));
      }
    }
  }
This visitor will convert {@link Statement}s to batch and is stateful, and can only be used in a
single thread. It only guarantees the correctness when is used by the schema snapshot and shall
not be used for other purposes.

<p>When the visitor is called, it shall encounter no:

<p>1. {@link StatementNode}s other than {@link Statement}s

<p>2. TimeSeries with identical path.

<p>3. Alter to the timeSeries and templates in batch.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/visitor/PipeTreeStatementToBatchVisitor.java