public static CreateAlignedTimeSeriesStatement createStatement(TSCreateAlignedTimeseriesReq req)
      throws IllegalPathException {
    final long startTime = System.nanoTime();
    // construct create aligned time series statement
    CreateAlignedTimeSeriesStatement statement = new CreateAlignedTimeSeriesStatement();
    statement.setDevicePath(DEVICE_PATH_CACHE.getPartialPath(req.prefixPath));
    List<TSDataType> dataTypes = new ArrayList<>();
    for (Integer dataType : req.dataTypes) {
      dataTypes.add(TSDataType.deserialize(dataType.byteValue()));
    }
    List<TSEncoding> encodings = new ArrayList<>();
    for (Integer encoding : req.encodings) {
      encodings.add(TSEncoding.deserialize(encoding.byteValue()));
    }
    List<CompressionType> compressors = new ArrayList<>();
    for (Integer compressor : req.compressors) {
      compressors.add(CompressionType.deserialize(compressor.byteValue()));
    }
    statement.setMeasurements(req.measurements);
    statement.setDataTypes(dataTypes);
    statement.setEncodings(encodings);
    statement.setCompressors(compressors);
    statement.setTagsList(req.tagsList);
    statement.setAttributesList(req.attributesList);
    statement.setAliasList(req.measurementAlias);
    PERFORMANCE_OVERVIEW_METRICS.recordParseCost(System.nanoTime() - startTime);
    return statement;
  }
Convert SQL and RPC requests to {@link Statement}.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java