public PageBuilder(BufferAllocator allocator, Schema schema, PageOutput output) { this.allocator = allocator; this.output = output; this.schema = schema; this.columnOffsets = PageFormat.columnOffsets(schema); this.nullBitSet = new byte[PageFormat.nullBitSetSize(schema)]; Arrays.fill(nullBitSet, (byte) -1); this.fixedRecordSize = PageFormat.recordHeaderSize(schema) + PageFormat.totalColumnSize(schema); this.nextVariableLengthDataOffset = fixedRecordSize; newBuffer(); }
public void flush() { doFlush(); if (buffer == null) { newBuffer(); } }