コード例 #1
0
            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));
            }
コード例 #2
0
            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));
            }
コード例 #3
0
            /// <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));
            }
コード例 #4
0
 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));
 }