OmniSciDB
c1a53651b2
|
#include <RowSetMemoryOwner.h>
Classes | |
struct | CountDistinctBitmapBuffer |
Public Types | |
enum | StringTranslationType { StringTranslationType::SOURCE_INTERSECTION, StringTranslationType::SOURCE_UNION } |
Public Member Functions | |
RowSetMemoryOwner (const size_t arena_block_size, const size_t num_kernel_threads=0) | |
int8_t * | allocate (const size_t num_bytes, const size_t thread_idx=0) override |
int8_t * | allocateCountDistinctBuffer (const size_t num_bytes, const size_t thread_idx=0) |
void | addCountDistinctBuffer (int8_t *count_distinct_buffer, const size_t bytes, const bool physical_buffer) |
void | addCountDistinctSet (CountDistinctSet *count_distinct_set) |
void | addGroupByBuffer (int64_t *group_by_buffer) |
void | addVarlenBuffer (void *varlen_buffer) |
void | addVarlenInputBuffer (Data_Namespace::AbstractBuffer *buffer) |
std::string * | addString (const std::string &str) |
std::vector< int64_t > * | addArray (const std::vector< int64_t > &arr) |
StringDictionaryProxy * | addStringDict (std::shared_ptr< StringDictionary > str_dict, const shared::StringDictKey &dict_key, const int64_t generation) |
std::string | generate_translation_map_key (const shared::StringDictKey &source_proxy_dict_key, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos) |
std::string | generate_translation_map_key (const shared::StringDictKey &source_proxy_dict_key, const shared::StringDictKey &dest_proxy_dict_key, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos) |
const StringDictionaryProxy::IdMap * | addStringProxyIntersectionTranslationMap (const StringDictionaryProxy *source_proxy, const StringDictionaryProxy *dest_proxy, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos) |
const StringDictionaryProxy::TranslationMap < Datum > * | addStringProxyNumericTranslationMap (const StringDictionaryProxy *source_proxy, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos) |
const StringDictionaryProxy::IdMap * | addStringProxyUnionTranslationMap (const StringDictionaryProxy *source_proxy, StringDictionaryProxy *dest_proxy, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos) |
const StringOps_Namespace::StringOps * | getStringOps (const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos) |
StringDictionaryProxy * | getStringDictProxy (const shared::StringDictKey &dict_key) const |
StringDictionaryProxy * | getOrAddStringDictProxy (const shared::StringDictKey &dict_key, const bool with_generation) |
void | addLiteralStringDictProxy (std::shared_ptr< StringDictionaryProxy > lit_str_dict_proxy) |
StringDictionaryProxy * | getLiteralStringDictProxy () const |
const StringDictionaryProxy::IdMap * | getOrAddStringProxyTranslationMap (const shared::StringDictKey &source_dict_id_in, const shared::StringDictKey &dest_dict_id_in, const bool with_generation, const StringTranslationType translation_map_type, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos) |
const StringDictionaryProxy::TranslationMap < Datum > * | getOrAddStringProxyNumericTranslationMap (const shared::StringDictKey &source_dict_id_in, const bool with_generation, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos) |
void | addColBuffer (const void *col_buffer) |
~RowSetMemoryOwner () | |
std::shared_ptr < RowSetMemoryOwner > | cloneStrDictDataOnly () |
void | setDictionaryGenerations (StringDictionaryGenerations generations) |
StringDictionaryGenerations & | getStringDictionaryGenerations () |
quantile::TDigest * | nullTDigest (double const q) |
void | setTableFunctionMetadata (const char *key, const uint8_t *raw_data, const size_t num_bytes, const TableFunctionMetadataType value_type) |
void | getTableFunctionMetadata (const char *key, const uint8_t *&raw_data, size_t &num_bytes, TableFunctionMetadataType &value_type) const |
AggMode * | allocateMode () |
Private Types | |
using | MetadataValue = std::pair< std::vector< uint8_t >, TableFunctionMetadataType > |
Friends | |
class | ResultSet |
class | QueryExecutionContext |
Additional Inherited Members | |
![]() | |
~SimpleAllocator ()=default | |
Handles allocations and outputs for all stages in a query, either explicitly or via a managed allocator object
Definition at line 50 of file RowSetMemoryOwner.h.
|
private |
Definition at line 375 of file RowSetMemoryOwner.h.
|
strong |
Enumerator | |
---|---|
SOURCE_INTERSECTION | |
SOURCE_UNION |
Definition at line 60 of file RowSetMemoryOwner.h.
|
inline |
Definition at line 52 of file RowSetMemoryOwner.h.
References allocators_, and CHECK.
|
inline |
Definition at line 270 of file RowSetMemoryOwner.h.
References CHECK, col_buffers_, count_distinct_sets_, group_by_buffers_, varlen_buffers_, and varlen_input_buffers_.
|
inline |
Definition at line 120 of file RowSetMemoryOwner.h.
References arrays_, and state_mutex_.
|
inline |
Definition at line 265 of file RowSetMemoryOwner.h.
References col_buffers_, and state_mutex_.
|
inline |
Definition at line 77 of file RowSetMemoryOwner.h.
References count_distinct_bitmaps_, and state_mutex_.
Referenced by allocateCountDistinctBuffer().
|
inline |
Definition at line 85 of file RowSetMemoryOwner.h.
References count_distinct_sets_, and state_mutex_.
|
inline |
Definition at line 90 of file RowSetMemoryOwner.h.
References group_by_buffers_, and state_mutex_.
|
inline |
Definition at line 241 of file RowSetMemoryOwner.h.
References lit_str_dict_proxy_, and state_mutex_.
|
inline |
|
inline |
Definition at line 126 of file RowSetMemoryOwner.h.
References CHECK_EQ, state_mutex_, and str_dict_proxy_owned_.
|
inline |
Definition at line 164 of file RowSetMemoryOwner.h.
References StringDictionaryProxy::buildIntersectionTranslationMapToOtherProxy(), generate_translation_map_key(), StringDictionaryProxy::getDictionary(), StringDictionary::getDictKey(), state_mutex_, and str_proxy_intersection_translation_maps_owned_.
|
inline |
Definition at line 184 of file RowSetMemoryOwner.h.
References StringDictionaryProxy::buildNumericTranslationMap(), generate_translation_map_key(), StringDictionaryProxy::getDictionary(), StringDictionary::getDictKey(), and str_proxy_numeric_translation_maps_owned_.
|
inline |
Definition at line 197 of file RowSetMemoryOwner.h.
References StringDictionaryProxy::buildUnionTranslationMapToOtherProxy(), generate_translation_map_key(), StringDictionaryProxy::getDictionary(), StringDictionary::getDictKey(), state_mutex_, and str_proxy_union_translation_maps_owned_.
|
inline |
Definition at line 95 of file RowSetMemoryOwner.h.
References state_mutex_, and varlen_buffers_.
|
inline |
Adds a GPU buffer containing a variable length input column. Variable length inputs on GPU are referenced in output projected targets and should not be freed until the query results have been resolved.
Definition at line 108 of file RowSetMemoryOwner.h.
References CHECK_EQ, Data_Namespace::AbstractBuffer::getType(), Data_Namespace::GPU_LEVEL, state_mutex_, and varlen_input_buffers_.
|
inlineoverridevirtual |
Implements SimpleAllocator.
Definition at line 62 of file RowSetMemoryOwner.h.
References allocators_, CHECK_LT, and state_mutex_.
Referenced by anonymous_namespace{QueryMemoryInitializer.cpp}::alloc_group_by_buffer(), and allocateCountDistinctBuffer().
|
inline |
Definition at line 69 of file RowSetMemoryOwner.h.
References addCountDistinctBuffer(), and allocate().
|
inline |
|
inline |
Definition at line 289 of file RowSetMemoryOwner.h.
References arena_block_size_, lit_str_dict_proxy_, and str_dict_proxy_owned_.
|
inline |
Definition at line 144 of file RowSetMemoryOwner.h.
Referenced by addStringProxyIntersectionTranslationMap(), addStringProxyNumericTranslationMap(), addStringProxyUnionTranslationMap(), and getStringOps().
|
inline |
Definition at line 153 of file RowSetMemoryOwner.h.
|
inline |
Definition at line 247 of file RowSetMemoryOwner.h.
References lit_str_dict_proxy_, and state_mutex_.
StringDictionaryProxy * RowSetMemoryOwner::getOrAddStringDictProxy | ( | const shared::StringDictKey & | dict_key, |
const bool | with_generation | ||
) |
Definition at line 537 of file Execute.cpp.
References CHECK, CHECK_EQ, CHECK_LE, shared::StringDictKey::db_id, shared::StringDictKey::dict_id, g_cache_string_hash, Catalog_Namespace::SysCatalog::getCatalog(), Catalog_Namespace::SysCatalog::instance(), dict_ref_t::literalsDictId, and REGULAR_DICT.
const StringDictionaryProxy::TranslationMap< Datum > * RowSetMemoryOwner::getOrAddStringProxyNumericTranslationMap | ( | const shared::StringDictKey & | source_dict_id_in, |
const bool | with_generation, | ||
const std::vector< StringOps_Namespace::StringOpInfo > & | string_op_infos | ||
) |
Definition at line 630 of file Execute.cpp.
const StringDictionaryProxy::IdMap * RowSetMemoryOwner::getOrAddStringProxyTranslationMap | ( | const shared::StringDictKey & | source_dict_id_in, |
const shared::StringDictKey & | dest_dict_id_in, | ||
const bool | with_generation, | ||
const StringTranslationType | translation_map_type, | ||
const std::vector< StringOps_Namespace::StringOpInfo > & | string_op_infos | ||
) |
Definition at line 613 of file Execute.cpp.
References SOURCE_INTERSECTION.
|
inline |
Definition at line 300 of file RowSetMemoryOwner.h.
References string_dictionary_generations_.
|
inline |
Definition at line 231 of file RowSetMemoryOwner.h.
References CHECK, state_mutex_, and str_dict_proxy_owned_.
|
inline |
Definition at line 217 of file RowSetMemoryOwner.h.
References generate_translation_map_key(), state_mutex_, and string_ops_owned_.
|
inline |
Definition at line 320 of file RowSetMemoryOwner.h.
References table_function_metadata_store_, and table_function_metadata_store_mutex_.
quantile::TDigest * RowSetMemoryOwner::nullTDigest | ( | double const | q | ) |
Definition at line 638 of file Execute.cpp.
References g_approx_quantile_buffer, and g_approx_quantile_centroids.
|
inline |
Definition at line 296 of file RowSetMemoryOwner.h.
References string_dictionary_generations_.
|
inline |
Definition at line 310 of file RowSetMemoryOwner.h.
References table_function_metadata_store_, and table_function_metadata_store_mutex_.
|
friend |
Definition at line 380 of file RowSetMemoryOwner.h.
|
friend |
Definition at line 379 of file RowSetMemoryOwner.h.
|
private |
Definition at line 371 of file RowSetMemoryOwner.h.
Referenced by allocate(), and RowSetMemoryOwner().
|
private |
Definition at line 370 of file RowSetMemoryOwner.h.
Referenced by cloneStrDictDataOnly().
|
private |
Definition at line 352 of file RowSetMemoryOwner.h.
Referenced by addArray().
|
private |
Definition at line 363 of file RowSetMemoryOwner.h.
Referenced by addColBuffer(), and ~RowSetMemoryOwner().
|
private |
Definition at line 347 of file RowSetMemoryOwner.h.
Referenced by addCountDistinctBuffer().
|
private |
Definition at line 348 of file RowSetMemoryOwner.h.
Referenced by addCountDistinctSet(), and ~RowSetMemoryOwner().
|
private |
Definition at line 349 of file RowSetMemoryOwner.h.
Referenced by addGroupByBuffer(), and ~RowSetMemoryOwner().
|
private |
Definition at line 361 of file RowSetMemoryOwner.h.
Referenced by addLiteralStringDictProxy(), cloneStrDictDataOnly(), and getLiteralStringDictProxy().
|
private |
Definition at line 368 of file RowSetMemoryOwner.h.
Referenced by allocateMode().
|
mutableprivate |
Definition at line 373 of file RowSetMemoryOwner.h.
Referenced by addArray(), addColBuffer(), addCountDistinctBuffer(), addCountDistinctSet(), addGroupByBuffer(), addLiteralStringDictProxy(), addString(), addStringDict(), addStringProxyIntersectionTranslationMap(), addStringProxyUnionTranslationMap(), addVarlenBuffer(), addVarlenInputBuffer(), allocate(), allocateMode(), getLiteralStringDictProxy(), getStringDictProxy(), and getStringOps().
|
private |
Definition at line 354 of file RowSetMemoryOwner.h.
Referenced by addStringDict(), cloneStrDictDataOnly(), and getStringDictProxy().
|
private |
Definition at line 356 of file RowSetMemoryOwner.h.
Referenced by addStringProxyIntersectionTranslationMap().
|
private |
Definition at line 360 of file RowSetMemoryOwner.h.
Referenced by addStringProxyNumericTranslationMap().
|
private |
Definition at line 358 of file RowSetMemoryOwner.h.
Referenced by addStringProxyUnionTranslationMap().
|
private |
Definition at line 362 of file RowSetMemoryOwner.h.
Referenced by getStringDictionaryGenerations(), and setDictionaryGenerations().
|
private |
Definition at line 367 of file RowSetMemoryOwner.h.
Referenced by getStringOps().
|
private |
Definition at line 351 of file RowSetMemoryOwner.h.
Referenced by addString().
|
private |
Definition at line 365 of file RowSetMemoryOwner.h.
|
private |
Definition at line 376 of file RowSetMemoryOwner.h.
Referenced by getTableFunctionMetadata(), and setTableFunctionMetadata().
|
mutableprivate |
Definition at line 377 of file RowSetMemoryOwner.h.
Referenced by getTableFunctionMetadata(), and setTableFunctionMetadata().
|
private |
Definition at line 350 of file RowSetMemoryOwner.h.
Referenced by addVarlenBuffer(), and ~RowSetMemoryOwner().
|
private |
Definition at line 364 of file RowSetMemoryOwner.h.
Referenced by addVarlenInputBuffer(), and ~RowSetMemoryOwner().