private void loadRepeatedOffsetAddress() {
   DrillBuf buf = vector.getOffsetVector().getBuffer();
   checkBuf(buf);
   this.repeatedOffset = buf.memoryAddress() + 4;
   this.repeatedOffsetOriginal = buf.memoryAddress() + 4;
   this.repeatedOffsetMax = buf.memoryAddress() + buf.capacity();
 }
 private void loadVarCharDataAddress() {
   DrillBuf buf = vector.getDataVector().getBuffer();
   checkBuf(buf);
   this.characterData = buf.memoryAddress();
   this.characterDataOriginal = buf.memoryAddress();
   this.characterDataMax = buf.memoryAddress() + buf.capacity();
 }
예제 #3
0
  private DrillBuf(
      BufferAllocator allocator,
      Accountor a,
      ByteBuf replacement,
      DrillBuf buffer,
      int index,
      int length,
      boolean root) {
    super(length);
    if (index < 0 || index > buffer.capacity() - length) {
      throw new IndexOutOfBoundsException(
          buffer.toString() + ".slice(" + index + ", " + length + ')');
    }

    this.length = length;
    writerIndex(length);

    this.b = replacement;
    this.addr = buffer.memoryAddress() + index;
    this.offset = index;
    this.acct = a;
    this.length = length;
    this.rootBuffer = root;
    this.allocator = allocator;
  }
 private void loadVarCharOffsetAddress() {
   DrillBuf buf = vector.getDataVector().getOffsetVector().getBuffer();
   checkBuf(buf);
   this.charLengthOffset = buf.memoryAddress() + 4;
   this.charLengthOffsetOriginal =
       buf.memoryAddress()
           + 4; // add four as offsets conceptually start at 1. (first item is 0..1)
   this.charLengthOffsetMax = buf.memoryAddress() + buf.capacity();
 }