OmniSciDB
72c90bc290
|
#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 executor_id, const size_t num_kernel_threads=0) | |
int8_t * | allocate (const size_t num_bytes, const size_t thread_idx=0) override |
std::pair< int64_t *, bool > | allocateCachedGroupByBuffer (const size_t num_bytes, const size_t thread_idx) |
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 | clearNonOwnedGroupByBuffers () |
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 | |
Protected Member Functions inherited from SimpleAllocator | |
~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 410 of file RowSetMemoryOwner.h.
|
strong |
Enumerator | |
---|---|
SOURCE_INTERSECTION | |
SOURCE_UNION |
Definition at line 67 of file RowSetMemoryOwner.h.
|
inline |
Definition at line 52 of file RowSetMemoryOwner.h.
References allocators_, CHECK, executor_id_, and VLOG.
|
inline |
Definition at line 293 of file RowSetMemoryOwner.h.
References allocators_, CHECK, col_buffers_, count_distinct_sets_, executor_id_, varlen_buffers_, varlen_input_buffers_, and VLOG.
|
inline |
Definition at line 143 of file RowSetMemoryOwner.h.
References arrays_, and state_mutex_.
|
inline |
Definition at line 288 of file RowSetMemoryOwner.h.
References col_buffers_, and state_mutex_.
|
inline |
Definition at line 101 of file RowSetMemoryOwner.h.
References count_distinct_bitmaps_, and state_mutex_.
Referenced by allocateCountDistinctBuffer().
|
inline |
Definition at line 109 of file RowSetMemoryOwner.h.
References count_distinct_sets_, and state_mutex_.
|
inline |
Definition at line 264 of file RowSetMemoryOwner.h.
References lit_str_dict_proxy_, and state_mutex_.
|
inline |
|
inline |
Definition at line 149 of file RowSetMemoryOwner.h.
References CHECK_EQ, state_mutex_, and str_dict_proxy_owned_.
|
inline |
Definition at line 187 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 207 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 220 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 118 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 131 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 69 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 76 of file RowSetMemoryOwner.h.
References allocators_, CHECK, CHECK_LT, non_owned_group_by_buffers_, and state_mutex_.
Referenced by anonymous_namespace{QueryMemoryInitializer.cpp}::alloc_group_by_buffer().
|
inline |
Definition at line 93 of file RowSetMemoryOwner.h.
References addCountDistinctBuffer(), and allocate().
|
inline |
|
inline |
Definition at line 114 of file RowSetMemoryOwner.h.
References non_owned_group_by_buffers_.
|
inline |
Definition at line 322 of file RowSetMemoryOwner.h.
References arena_block_size_, executor_id_, lit_str_dict_proxy_, and str_dict_proxy_owned_.
|
inline |
Definition at line 167 of file RowSetMemoryOwner.h.
Referenced by addStringProxyIntersectionTranslationMap(), addStringProxyNumericTranslationMap(), addStringProxyUnionTranslationMap(), and getStringOps().
|
inline |
Definition at line 176 of file RowSetMemoryOwner.h.
|
inline |
Definition at line 270 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 572 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 665 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 648 of file Execute.cpp.
References SOURCE_INTERSECTION.
|
inline |
Definition at line 334 of file RowSetMemoryOwner.h.
References string_dictionary_generations_.
|
inline |
Definition at line 254 of file RowSetMemoryOwner.h.
References CHECK, state_mutex_, and str_dict_proxy_owned_.
|
inline |
Definition at line 240 of file RowSetMemoryOwner.h.
References generate_translation_map_key(), state_mutex_, and string_ops_owned_.
|
inline |
Definition at line 354 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 673 of file Execute.cpp.
References g_approx_quantile_buffer, and g_approx_quantile_centroids.
|
inline |
Definition at line 330 of file RowSetMemoryOwner.h.
References string_dictionary_generations_.
|
inline |
Definition at line 344 of file RowSetMemoryOwner.h.
References table_function_metadata_store_, and table_function_metadata_store_mutex_.
|
friend |
Definition at line 415 of file RowSetMemoryOwner.h.
|
friend |
Definition at line 414 of file RowSetMemoryOwner.h.
|
private |
Definition at line 405 of file RowSetMemoryOwner.h.
Referenced by allocate(), allocateCachedGroupByBuffer(), RowSetMemoryOwner(), and ~RowSetMemoryOwner().
|
private |
Definition at line 404 of file RowSetMemoryOwner.h.
Referenced by cloneStrDictDataOnly().
|
private |
Definition at line 386 of file RowSetMemoryOwner.h.
Referenced by addArray().
|
private |
Definition at line 397 of file RowSetMemoryOwner.h.
Referenced by addColBuffer(), and ~RowSetMemoryOwner().
|
private |
Definition at line 381 of file RowSetMemoryOwner.h.
Referenced by addCountDistinctBuffer().
|
private |
Definition at line 382 of file RowSetMemoryOwner.h.
Referenced by addCountDistinctSet(), and ~RowSetMemoryOwner().
|
private |
Definition at line 406 of file RowSetMemoryOwner.h.
Referenced by cloneStrDictDataOnly(), RowSetMemoryOwner(), and ~RowSetMemoryOwner().
|
private |
Definition at line 395 of file RowSetMemoryOwner.h.
Referenced by addLiteralStringDictProxy(), cloneStrDictDataOnly(), and getLiteralStringDictProxy().
|
private |
Definition at line 402 of file RowSetMemoryOwner.h.
Referenced by allocateMode().
|
private |
Definition at line 383 of file RowSetMemoryOwner.h.
Referenced by allocateCachedGroupByBuffer(), and clearNonOwnedGroupByBuffers().
|
mutableprivate |
Definition at line 408 of file RowSetMemoryOwner.h.
Referenced by addArray(), addColBuffer(), addCountDistinctBuffer(), addCountDistinctSet(), addLiteralStringDictProxy(), addString(), addStringDict(), addStringProxyIntersectionTranslationMap(), addStringProxyUnionTranslationMap(), addVarlenBuffer(), addVarlenInputBuffer(), allocate(), allocateCachedGroupByBuffer(), allocateMode(), getLiteralStringDictProxy(), getStringDictProxy(), and getStringOps().
|
private |
Definition at line 388 of file RowSetMemoryOwner.h.
Referenced by addStringDict(), cloneStrDictDataOnly(), and getStringDictProxy().
|
private |
Definition at line 390 of file RowSetMemoryOwner.h.
Referenced by addStringProxyIntersectionTranslationMap().
|
private |
Definition at line 394 of file RowSetMemoryOwner.h.
Referenced by addStringProxyNumericTranslationMap().
|
private |
Definition at line 392 of file RowSetMemoryOwner.h.
Referenced by addStringProxyUnionTranslationMap().
|
private |
Definition at line 396 of file RowSetMemoryOwner.h.
Referenced by getStringDictionaryGenerations(), and setDictionaryGenerations().
|
private |
Definition at line 401 of file RowSetMemoryOwner.h.
Referenced by getStringOps().
|
private |
Definition at line 385 of file RowSetMemoryOwner.h.
Referenced by addString().
|
private |
Definition at line 399 of file RowSetMemoryOwner.h.
|
private |
Definition at line 411 of file RowSetMemoryOwner.h.
Referenced by getTableFunctionMetadata(), and setTableFunctionMetadata().
|
mutableprivate |
Definition at line 412 of file RowSetMemoryOwner.h.
Referenced by getTableFunctionMetadata(), and setTableFunctionMetadata().
|
private |
Definition at line 384 of file RowSetMemoryOwner.h.
Referenced by addVarlenBuffer(), and ~RowSetMemoryOwner().
|
private |
Definition at line 398 of file RowSetMemoryOwner.h.
Referenced by addVarlenInputBuffer(), and ~RowSetMemoryOwner().