@Override
  public Analysis visitInsertRowsOfOneDevice(
      InsertRowsOfOneDeviceStatement insertRowsOfOneDeviceStatement, MPPQueryContext context) {
    context.setQueryType(QueryType.WRITE);
    insertRowsOfOneDeviceStatement.semanticCheck();
    Analysis analysis = new Analysis();
    validateSchema(
        analysis,
        insertRowsOfOneDeviceStatement,
        () -> SchemaValidator.validate(schemaFetcher, insertRowsOfOneDeviceStatement, context));
    InsertBaseStatement realInsertStatement =
        removeLogicalView(analysis, insertRowsOfOneDeviceStatement);
    if (analysis.isFinishQueryAfterAnalyze()) {
      return analysis;
    }
    analysis.setRealStatement(realInsertStatement);

    if (realInsertStatement instanceof InsertRowsOfOneDeviceStatement) {
      InsertRowsOfOneDeviceStatement realStatement =
          (InsertRowsOfOneDeviceStatement) realInsertStatement;
      DataPartitionQueryParam dataPartitionQueryParam = new DataPartitionQueryParam();
      dataPartitionQueryParam.setDeviceID(realStatement.getDevicePath().getIDeviceIDAsFullDevice());
      dataPartitionQueryParam.setTimePartitionSlotList(realStatement.getTimePartitionSlots());

      AnalyzeUtils.analyzeDataPartition(
          analysis,
          Collections.singletonList(dataPartitionQueryParam),
          context.getSession().getUserName(),
          partitionFetcher::getOrCreateDataPartition);
    } else {
      AnalyzeUtils.analyzeDataPartition(
          analysis,
          AnalyzeUtils.computeTreeDataPartitionParams(realInsertStatement, context),
          context.getSession().getUserName(),
          partitionFetcher::getOrCreateDataPartition);
    }
    return analysis;
  }
Check datatype consistency in ALIGN BY DEVICE.

<p>an inconsistent example: select s0 from root.sg1.d1, root.sg1.d2 align by device, return
false while root.sg1.d1.s0 is INT32 and root.sg1.d2.s0 is FLOAT.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeVisitor.java