public static boolean isTabletContainsSingleDevice(Tablet tablet) {
    if (tablet.getRowSize() == 1) {
      return true;
    }
    IDeviceID firstDeviceId = tablet.getDeviceID(0);
    for (int i = 1; i < tablet.getRowSize(); ++i) {
      if (!firstDeviceId.equals(tablet.getDeviceID(i))) {
        return false;
      }
    }
    return true;
  }
put value in buffer

@param types types list
@param values values list
@param buffer buffer to insert
@throws IoTDBConnectionException
iotdb-client/session/src/main/java/org/apache/iotdb/session/util/SessionUtils.java