public static Tablet generateTablet(
      final String tableName,
      final int deviceStartIndex,
      final int deviceEndIndex,
      final int deviceDataSize,
      final boolean allowNullValue,
      final boolean allowNullDeviceColumn) {
    List<IMeasurementSchema> schemaList = new ArrayList<>();
    schemaList.add(new MeasurementSchema("s0", TSDataType.STRING));
    schemaList.add(new MeasurementSchema("s1", TSDataType.STRING));
    schemaList.add(new MeasurementSchema("s2", TSDataType.STRING));
    schemaList.add(new MeasurementSchema("s3", TSDataType.STRING));
    schemaList.add(new MeasurementSchema("s4", TSDataType.INT64));
    schemaList.add(new MeasurementSchema("s5", TSDataType.FLOAT));
    schemaList.add(new MeasurementSchema("s6", TSDataType.STRING));
    schemaList.add(new MeasurementSchema("s7", TSDataType.TIMESTAMP));
    schemaList.add(new MeasurementSchema("s8", TSDataType.INT32));
    schemaList.add(new MeasurementSchema("s9", TSDataType.DOUBLE));
    schemaList.add(new MeasurementSchema("s10", TSDataType.DATE));
    schemaList.add(new MeasurementSchema("s11", TSDataType.TEXT));

    final List<ColumnCategory> columnTypes =
        Arrays.asList(
            ColumnCategory.TAG,
            ColumnCategory.TAG,
            ColumnCategory.TAG,
            ColumnCategory.TAG,
            ColumnCategory.FIELD,
            ColumnCategory.FIELD,
            ColumnCategory.FIELD,
            ColumnCategory.FIELD,
            ColumnCategory.FIELD,
            ColumnCategory.FIELD,
            ColumnCategory.FIELD,
            ColumnCategory.FIELD);
    Tablet tablet =
        new Tablet(
            tableName,
            IMeasurementSchema.getMeasurementNameList(schemaList),
            IMeasurementSchema.getDataTypeList(schemaList),
            columnTypes,
            (deviceEndIndex - deviceStartIndex) * deviceDataSize);
    tablet.initBitMaps();
    final Random random = new Random();
    int nullDeviceIndex = allowNullDeviceColumn ? random.nextInt(4) : 4;

    for (int deviceIndex = deviceStartIndex; deviceIndex < deviceEndIndex; deviceIndex++) {
      // s2 float, s3 string, s4 timestamp, s5 int32, s6 double, s7 date, s8 text
      long value = random.nextInt(1 << 16);
      for (long row = 0; row < deviceDataSize; row++) {
        int randomNumber = allowNullValue ? random.nextInt(12) : 12;
        int rowIndex = tablet.getRowSize();
        value += random.nextInt(100);
        tablet.addTimestamp(rowIndex, value);
        tablet.addValue(
            "s0",
            rowIndex,
            new Binary(String.format("t%s", deviceIndex).getBytes(StandardCharsets.UTF_8)));
        tablet.addValue(
            "s1",
            rowIndex,
            new Binary(String.format("t%s", deviceIndex).getBytes(StandardCharsets.UTF_8)));
        tablet.addValue(
            "s2",
            rowIndex,
            new Binary(String.format("t%s", deviceIndex).getBytes(StandardCharsets.UTF_8)));
        tablet.addValue(
            "s3",
            rowIndex,
            new Binary(String.format("t%s", deviceIndex).getBytes(StandardCharsets.UTF_8)));
        tablet.addValue("s4", rowIndex, value);
        tablet.addValue("s5", rowIndex, (value * 1.0f));
        tablet.addValue(
            "s6", rowIndex, new Binary(String.valueOf(value).getBytes(StandardCharsets.UTF_8)));
        tablet.addValue("s7", rowIndex, value);
        tablet.addValue("s8", rowIndex, (int) value);
        tablet.addValue("s9", rowIndex, value * 0.1);
        tablet.addValue("s10", rowIndex, getDate((int) value));
        tablet.addValue(
            "s11", rowIndex, new Binary(String.valueOf(value).getBytes(StandardCharsets.UTF_8)));
        if (randomNumber < 12) {
          tablet.addValue("s" + randomNumber, rowIndex, null);
        }
        if (nullDeviceIndex < 4) {
          tablet.addValue("s" + nullDeviceIndex, rowIndex, null);
        }
        tablet.setRowSize(rowIndex + 1);
      }
    }

    return tablet;
  }
This class is specifically designed for table model testing and is used for data insertion.
Please note that the Table pattern defined by this class is fixed, and it is recommended to use
all methods together to ensure data consistency and integrity.

<p>This class provides a structured approach to inserting data, suitable for scenarios where
batch data insertion is required. Due to the fixed pattern, users should ensure that the data
format matches the pattern defined by the class.
integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/tablemodel/TableModelUtils.java