File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,19 @@ namespace sparrow_ipc::utils
7777 const org::apache::arrow::flatbuf::BodyCompression* compression
7878 );
7979
80+ /* *
81+ * @brief Extracts a buffer from a RecordBatch's body.
82+ *
83+ * This function retrieves a buffer span from the specified index in the RecordBatch's
84+ * buffer list and increments the index.
85+ *
86+ * @param record_batch The Arrow RecordBatch containing buffer metadata.
87+ * @param body The raw buffer data as a byte span.
88+ * @param buffer_index The index of the buffer to retrieve. This value is incremented by the function.
89+ *
90+ * @return A `std::span<const uint8_t>` viewing the extracted buffer data.
91+ * @throws std::runtime_error if the buffer metadata indicates a buffer that exceeds the body size.
92+ */
8093 [[nodiscard]] std::span<const uint8_t > get_buffer (
8194 const org::apache::arrow::flatbuf::RecordBatch& record_batch,
8295 std::span<const uint8_t > body,
You can’t perform that action at this time.
0 commit comments