sparrow-ipc 0.2.0
Loading...
Searching...
No Matches
deserialize_primitive_array.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <optional>
4#include <vector>
5
6#include <sparrow/arrow_interface/arrow_array_schema_proxy.hpp>
7#include <sparrow/primitive_array.hpp>
8
9#include "Message_generated.h"
11
12namespace sparrow_ipc
13{
14 template <typename T>
15 [[nodiscard]] sparrow::primitive_array<T> deserialize_primitive_array(
16 const org::apache::arrow::flatbuf::RecordBatch& record_batch,
17 std::span<const uint8_t> body,
18 std::string_view name,
19 const std::optional<std::vector<sparrow::metadata_pair>>& metadata,
20 bool nullable,
21 size_t& buffer_index
22 )
23 {
25 record_batch,
26 body,
27 name,
28 metadata,
29 nullable,
30 buffer_index
31 );
32 }
33}
ArrayType< T > deserialize_simple_array(const org::apache::arrow::flatbuf::RecordBatch &record_batch, std::span< const uint8_t > body, std::string_view name, const std::optional< std::vector< sparrow::metadata_pair > > &metadata, bool nullable, size_t &buffer_index, std::optional< std::string > format_override=std::nullopt)
Generic implementation for deserializing non-owning arrays with simple layout.
sparrow::primitive_array< T > deserialize_primitive_array(const org::apache::arrow::flatbuf::RecordBatch &record_batch, std::span< const uint8_t > body, std::string_view name, const std::optional< std::vector< sparrow::metadata_pair > > &metadata, bool nullable, size_t &buffer_index)