private static ArrowBuffer BuildArrowBuffer(FlatBuffers.ByteBuffer bodyData, Flatbuf.Buffer buffer)
        {
            if (buffer.Length <= 0)
            {
                return(null);
            }

            var segment = bodyData.ToArraySegment((int)buffer.Offset, (int)buffer.Length);

            return(ArrowBuffer.FromMemory(segment));
        }
Example #2
0
        private static ArrowBuffer BuildArrowBuffer(FlatBuffers.ByteBuffer bodyData, Flatbuf.Buffer buffer)
        {
            if (buffer.Length <= 0)
            {
                return(ArrowBuffer.Empty);
            }

            var segment = bodyData.ToArraySegment((int)buffer.Offset, (int)buffer.Length);

            return(new ArrowBuffer.Builder <byte>(segment.Count)
                   .Append(segment)
                   .Build());
        }