12#ifndef ARROWTABLESLICINGCACHE_H
13#define ARROWTABLESLICINGCACHE_H
17#include <arrow/array.h>
54 return (lhs.matcher == rhs.matcher) &&
59using Cache = std::vector<Entry>;
81 std::vector<std::vector<int64_t>>
offsets;
82 std::vector<std::vector<int64_t>>
sizes;
100 std::pair<int, bool>
getCachePos(Entry
const& bindingKey)
const;
105 SliceInfoPtr
getCacheFor(Entry
const& bindingKey)
const;
113 std::shared_ptr<arrow::Table>
getEmptySliceFor(std::shared_ptr<arrow::Table>
const& table);
114 std::pair<arrow::Table const*, std::shared_ptr<arrow::Table>>
emptySlice{
nullptr,
nullptr};
116 static void validateOrder(
Entry const& bindingKey, std::shared_ptr<arrow::Table>
const& input);
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * value
Defining ITS Vertex explicitly as messageable.
void updatePairList(Cache &list, Entry &entry)
ServiceKind
The kind of service we are asking for.
std::vector< Entry > Cache
std::vector< std::vector< int64_t > > ListVector
header::DataOrigin newOrigin
static constexpr ServiceKind service_kind
void setCachesUnsorted(Cache &&bsks)
void setCaches(Cache &&bsks)
void setOrigin(header::DataOrigin newOrigin_=header::DataOrigin{"AOD"})
Cache bindingsKeysUnsorted
std::vector< std::vector< int64_t > > offsets
SliceInfoPtr getCacheForPos(int pos) const
SliceInfoUnsortedPtr getCacheUnsortedFor(Entry const &bindingKey) const
arrow::Status updateCacheEntryUnsorted(int pos, std::shared_ptr< arrow::Table > const &table)
header::DataOrigin newOrigin
int getCachePosSortedFor(Entry const &bindingKey) const
std::vector< std::vector< int64_t > > sizes
std::vector< ListVector > groups
arrow::Status updateCacheEntry(int pos, std::shared_ptr< arrow::Table > const &table)
std::pair< int, bool > getCachePos(Entry const &bindingKey) const
SliceInfoPtr getCacheFor(Entry const &bindingKey) const
void setCaches(Cache &&bsks, Cache &&bsksUnsorted={})
static constexpr ServiceKind service_kind
std::pair< arrow::Table const *, std::shared_ptr< arrow::Table > > emptySlice
Cache bindingsKeysUnsorted
SliceInfoUnsortedPtr getCacheUnsortedForPos(int pos) const
std::shared_ptr< arrow::Table > getEmptySliceFor(std::shared_ptr< arrow::Table > const &table)
int getCachePosUnsortedFor(Entry const &bindingKey) const
std::vector< std::vector< int > > valuesUnsorted
static void validateOrder(Entry const &bindingKey, std::shared_ptr< arrow::Table > const &input)
ConcreteDataMatcher matcher
friend bool operator==(Entry const &lhs, Entry const &rhs)
Entry(std::string b, ConcreteDataMatcher m, std::string k, bool e=true)
gsl::span< int64_t const > sizes
gsl::span< int64_t const > offsets
std::pair< int64_t, int64_t > getSliceFor(int value) const
std::span< int64_t const > getSliceFor(int value) const
ListVector const * groups
std::span< int const > values