@Override
  public PlanNode visitInsertMultiTablets(
      InsertMultiTabletsStatement insertMultiTabletsStatement, MPPQueryContext context) {
    // convert insert statement to insert node
    InsertMultiTabletsNode insertMultiTabletsNode =
        new InsertMultiTabletsNode(context.getQueryId().genPlanNodeId());
    for (int i = 0; i < insertMultiTabletsStatement.getInsertTabletStatementList().size(); i++) {
      InsertTabletStatement insertTabletStatement =
          insertMultiTabletsStatement.getInsertTabletStatementList().get(i);

      String[] measurements = insertTabletStatement.getMeasurements();
      MeasurementSchema[] measurementSchemas = insertTabletStatement.getMeasurementSchemas();
      stayConsistent(measurements, measurementSchemas);

      InsertTabletNode insertTabletNode =
          new InsertTabletNode(
              insertMultiTabletsNode.getPlanNodeId(),
              insertTabletStatement.getDevicePath(),
              insertTabletStatement.isAligned(),
              measurements,
              insertTabletStatement.getDataTypes(),
              measurementSchemas,
              insertTabletStatement.getTimes(),
              insertTabletStatement.getBitMaps(),
              insertTabletStatement.getColumns(),
              insertTabletStatement.getRowCount());
      insertTabletNode.setFailedMeasurementNumber(
          insertTabletStatement.getFailedMeasurementNumber());
      insertMultiTabletsNode.addInsertTabletNode(insertTabletNode, i);
    }
    return insertMultiTabletsNode;
  }
This visitor is used to generate a logical plan for the statement and returns the {@link
PlanNode}.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LogicalPlanVisitor.java