@Override
  public PlanNode visitInsertTablet(
      InsertTabletStatement insertTabletStatement, MPPQueryContext context) {
    String[] measurements = insertTabletStatement.getMeasurements();
    MeasurementSchema[] measurementSchemas = insertTabletStatement.getMeasurementSchemas();
    stayConsistent(measurements, measurementSchemas);

    // convert insert statement to insert node
    InsertTabletNode insertNode =
        new InsertTabletNode(
            context.getQueryId().genPlanNodeId(),
            insertTabletStatement.getDevicePath(),
            insertTabletStatement.isAligned(),
            measurements,
            insertTabletStatement.getDataTypes(),
            measurementSchemas,
            insertTabletStatement.getTimes(),
            insertTabletStatement.getBitMaps(),
            insertTabletStatement.getColumns(),
            insertTabletStatement.getRowCount());
    insertNode.setFailedMeasurementNumber(insertTabletStatement.getFailedMeasurementNumber());
    return insertNode;
  }
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