private void resize(int newLength) {
    boolean[] newData = new boolean[newLength];
    for (int i = 0; i < size; i++) {
      newData[i] = data[(head + i) % data.length];
    }
    data = newData;
    head = 0;
    tail = size;
  }
change size of queue.

@param newLength new length of queue
library-udf/src/main/java/org/apache/iotdb/library/util/BooleanCircularQueue.java