public TArray Build(MemoryAllocator allocator = default) { ValueOffsets.Append(Offset); var data = new ArrayData(DataType, ValueOffsets.Length - 1, 0, 0, new[] { ArrowBuffer.Empty, ValueOffsets.Build(allocator), ValueBuffer.Build(allocator) }); return(Build(data)); }
public TArray Build(MemoryAllocator allocator = default) { ValueOffsets.Append(Offset); ArrowBuffer validityBuffer = NullCount > 0 ? ValidityBuffer.Build(allocator).ValueBuffer : ArrowBuffer.Empty; var data = new ArrayData(DataType, ValueOffsets.Length - 1, NullCount, 0, new[] { validityBuffer, ValueOffsets.Build(allocator), ValueBuffer.Build(allocator) }); return(Build(data)); }
/// <summary> /// Build an Arrow array from the appended contents so far. /// </summary> /// <param name="allocator">Optional memory allocator.</param> /// <returns>Returns an array of type <typeparamref name="TArray"/>.</returns> public TArray Build(MemoryAllocator allocator = default) { var bufs = new[] { NullCount > 0 ? ValidityBuffer.Build(allocator) : ArrowBuffer.Empty, ValueOffsets.Build(allocator), ValueBuffer.Build(allocator), }; var data = new ArrayData( DataType, length: Length, NullCount, offset: 0, bufs); return(Build(data)); }
public StringDictionaryArray Build(MemoryAllocator allocator) { ValueOffsets.Append(Offset); return(new StringDictionaryArray(IndicesBuffer.Length, Entries.Count, NullBitmap.Build(allocator), IndicesBuffer.Build(allocator), ValueBuffer.Build(allocator), ValueOffsets.Build(allocator), NullCount)); }