OmniSciDB
a5dc49c757
|
Namespaces | |
anonymous_namespace{InsertOrderFragmenter.cpp} | |
anonymous_namespace{UpdelStorage.cpp} | |
Classes | |
class | RowDataProvider |
struct | UpdateValuesStats |
struct | ChunkUpdateStats |
class | AbstractFragmenter |
struct | InsertChunks |
struct | InsertData |
The data to be inserted using the fragment manager. More... | |
class | FragmentInfo |
Used by Fragmenter classes to store info about each fragment - the fragment id and number of tuples(rows) currently stored by that fragment. More... | |
class | TableInfo |
struct | ShardDataOwner |
struct | BlockWithColumnId |
class | InsertDataLoader |
class | LocalInsertConnector |
class | InsertOrderFragmenter |
The InsertOrderFragmenter is a child class of AbstractFragmenter, and fragments data in insert order. Likely the default fragmenter. More... | |
class | SortedOrderFragmenter |
struct | ChunkToInsertDataConverter |
struct | ScalarChunkConverter |
struct | FixedLenArrayChunkConverter |
struct | ArrayChunkConverter |
struct | StringChunkConverter |
struct | DateChunkConverter |
Enumerations | |
enum | FragmenterType { INSERT_ORDER = 0 } |
Functions | |
template<typename SRC > | |
std::vector< std::vector < size_t > > | compute_row_indices_of_shards (size_t shard_count, size_t leaf_count, size_t row_count, SRC *src, bool duplicated_key_value) |
template<typename T > | |
size_t | indexOf (std::vector< T > &vec, T val) |
bool | isStringVectorData (const ColumnDescriptor *cd) |
bool | isDatumVectorData (const ColumnDescriptor *cd) |
size_t | size_of_raw_column (const Catalog_Namespace::Catalog &cat, const ColumnDescriptor *cd, const bool get_logical_size=true) |
std::vector< std::vector < size_t > > | compute_row_indices_of_shards (const Catalog_Namespace::Catalog &cat, size_t leaf_count, const InsertChunks &insert_chunks) |
std::vector< std::vector < size_t > > | computeRowIndicesOfShards (const Catalog_Namespace::Catalog &cat, size_t leafCount, InsertData &insert_data) |
template<typename T > | |
void | copyColumnDataOfShard (const std::vector< size_t > &rowIndices, T *src, T *dst) |
BlockWithColumnId | copyColumnDataOfShard (const Catalog_Namespace::Catalog &cat, ShardDataOwner &dataOwner, const std::vector< size_t > &rowIndices, const ColumnDescriptor *pCol, size_t columnIndex, DataBlockPtr dataBlock, bool is_default) |
std::pair< std::list < std::unique_ptr < foreign_storage::ForeignStorageBuffer > >, InsertChunks > | copy_data_of_shard (const Catalog_Namespace::Catalog &cat, const InsertChunks &insert_chunks, int shardTableIndex, const std::vector< size_t > &rowIndices) |
InsertData | copyDataOfShard (const Catalog_Namespace::Catalog &cat, ShardDataOwner &dataOwner, InsertData &insert_data, int shardTableIndex, const std::vector< size_t > &rowIndices) |
template<typename T > | |
void | shuffleByIndexesImpl (const std::vector< size_t > &indexes, T *buffer) |
template<typename T > | |
void | shuffleByIndexesImpl (const std::vector< size_t > &indexes, std::vector< T > &buffer) |
void | shuffleByIndexes (const ColumnDescriptor *cd, const std::vector< size_t > &indexes, DataBlockPtr &data) |
template<typename T > | |
void | sortIndexesImpl (std::vector< size_t > &indexes, const T *buffer) |
void | sortIndexesImpl (std::vector< size_t > &indexes, const std::vector< std::string > &buffer) |
void | sortIndexesImpl (std::vector< size_t > &indexes, const std::vector< ArrayDatum > &buffer) |
void | sortIndexes (const ColumnDescriptor *cd, std::vector< size_t > &indexes, const DataBlockPtr &data) |
void | wait_cleanup_threads (std::vector< std::future< void >> &threads) |
bool | is_integral (const SQLTypeInfo &t) |
static int | get_chunks (const Catalog_Namespace::Catalog *catalog, const TableDescriptor *td, const FragmentInfo &fragment, const Data_Namespace::MemoryLevel memory_level, std::vector< std::shared_ptr< Chunk_NS::Chunk >> &chunks) |
template<typename T > | |
static void | set_chunk_stats (const SQLTypeInfo &col_type, int8_t *data_addr, bool &has_null, T &min, T &max) |
static void | set_chunk_metadata (const Catalog_Namespace::Catalog *catalog, FragmentInfo &fragment, const std::shared_ptr< Chunk_NS::Chunk > &chunk, const size_t nrows_to_keep, UpdelRoll &updel_roll) |
size_t | get_null_padding (bool is_varlen_array, const std::vector< uint64_t > &frag_offsets, const StringOffsetT *index_array, size_t fragment_row_count) |
std::set< size_t > | get_var_len_null_array_indexes (const SQLTypeInfo sql_type_info, const std::vector< uint64_t > &frag_offsets, const StringOffsetT *index_array, size_t fragment_row_count) |
StringOffsetT | get_buffer_offset (bool is_varlen_array, const StringOffsetT *index_array, size_t index) |
stores the type of a child class of AbstractTableFragmenter
Enumerator | |
---|---|
INSERT_ORDER |
Definition at line 45 of file Fragmenter.h.
std::vector<std::vector<size_t> > Fragmenter_Namespace::compute_row_indices_of_shards | ( | size_t | shard_count, |
size_t | leaf_count, | ||
size_t | row_count, | ||
SRC * | src, | ||
bool | duplicated_key_value | ||
) |
Definition at line 35 of file InsertDataLoader.cpp.
References SHARD_FOR_KEY.
Referenced by compute_row_indices_of_shards(), computeRowIndicesOfShards(), and Fragmenter_Namespace::InsertDataLoader::insertChunks().
std::vector<std::vector<size_t> > Fragmenter_Namespace::compute_row_indices_of_shards | ( | const Catalog_Namespace::Catalog & | cat, |
size_t | leaf_count, | ||
const InsertChunks & | insert_chunks | ||
) |
Definition at line 124 of file InsertDataLoader.cpp.
References CHECK, Fragmenter_Namespace::InsertChunks::chunks, compute_row_indices_of_shards(), Chunk_NS::Chunk::getBuffer(), Data_Namespace::AbstractBuffer::getEncoder(), Catalog_Namespace::Catalog::getMetadataForTable(), Encoder::getNumElems(), Catalog_Namespace::Catalog::getShardColumnMetadataForTable(), isDatumVectorData(), isStringVectorData(), size_of_raw_column(), Fragmenter_Namespace::InsertChunks::table_id, and UNREACHABLE.
std::vector<std::vector<size_t> > Fragmenter_Namespace::computeRowIndicesOfShards | ( | const Catalog_Namespace::Catalog & | cat, |
size_t | leafCount, | ||
InsertData & | insert_data | ||
) |
Definition at line 172 of file InsertDataLoader.cpp.
References CHECK, Fragmenter_Namespace::InsertData::columnIds, compute_row_indices_of_shards(), Fragmenter_Namespace::InsertData::data, Catalog_Namespace::Catalog::getMetadataForTable(), Catalog_Namespace::Catalog::getShardColumnMetadataForTable(), indexOf(), Fragmenter_Namespace::InsertData::is_default, isDatumVectorData(), isStringVectorData(), DataBlockPtr::numbersPtr, Fragmenter_Namespace::InsertData::numRows, size_of_raw_column(), and Fragmenter_Namespace::InsertData::tableId.
Referenced by Fragmenter_Namespace::InsertDataLoader::insertData().
std::pair<std::list<std::unique_ptr<foreign_storage::ForeignStorageBuffer> >, InsertChunks> Fragmenter_Namespace::copy_data_of_shard | ( | const Catalog_Namespace::Catalog & | cat, |
const InsertChunks & | insert_chunks, | ||
int | shardTableIndex, | ||
const std::vector< size_t > & | rowIndices | ||
) |
Definition at line 298 of file InsertDataLoader.cpp.
References CHECK_EQ, Fragmenter_Namespace::InsertChunks::chunks, Fragmenter_Namespace::InsertChunks::db_id, Catalog_Namespace::Catalog::getMetadataForTable(), Catalog_Namespace::Catalog::getPhysicalTablesDescriptors(), Fragmenter_Namespace::InsertChunks::table_id, and Fragmenter_Namespace::InsertChunks::valid_row_indices.
Referenced by Fragmenter_Namespace::InsertDataLoader::insertChunks().
void Fragmenter_Namespace::copyColumnDataOfShard | ( | const std::vector< size_t > & | rowIndices, |
T * | src, | ||
T * | dst | ||
) |
Definition at line 222 of file InsertDataLoader.cpp.
Referenced by copyColumnDataOfShard(), and copyDataOfShard().
BlockWithColumnId Fragmenter_Namespace::copyColumnDataOfShard | ( | const Catalog_Namespace::Catalog & | cat, |
ShardDataOwner & | dataOwner, | ||
const std::vector< size_t > & | rowIndices, | ||
const ColumnDescriptor * | pCol, | ||
size_t | columnIndex, | ||
DataBlockPtr | dataBlock, | ||
bool | is_default | ||
) |
Definition at line 235 of file InsertDataLoader.cpp.
References Fragmenter_Namespace::ShardDataOwner::arrayData, DataBlockPtr::arraysPtr, ColumnDescriptor::columnId, copyColumnDataOfShard(), isDatumVectorData(), isStringVectorData(), DataBlockPtr::numbersPtr, Fragmenter_Namespace::ShardDataOwner::rawData, report::rows, size_of_raw_column(), Fragmenter_Namespace::ShardDataOwner::stringData, and DataBlockPtr::stringsPtr.
InsertData Fragmenter_Namespace::copyDataOfShard | ( | const Catalog_Namespace::Catalog & | cat, |
ShardDataOwner & | dataOwner, | ||
InsertData & | insert_data, | ||
int | shardTableIndex, | ||
const std::vector< size_t > & | rowIndices | ||
) |
Definition at line 342 of file InsertDataLoader.cpp.
References Fragmenter_Namespace::ShardDataOwner::arrayData, threading_serial::async(), cat(), Fragmenter_Namespace::InsertData::columnIds, copyColumnDataOfShard(), Fragmenter_Namespace::InsertData::data, Fragmenter_Namespace::InsertData::databaseId, Catalog_Namespace::Catalog::getAllColumnMetadataForTable(), Catalog_Namespace::Catalog::getMetadataForTable(), Catalog_Namespace::Catalog::getPhysicalTablesDescriptors(), indexOf(), Fragmenter_Namespace::InsertData::is_default, Fragmenter_Namespace::InsertData::numRows, Fragmenter_Namespace::ShardDataOwner::rawData, Fragmenter_Namespace::ShardDataOwner::stringData, and Fragmenter_Namespace::InsertData::tableId.
Referenced by Fragmenter_Namespace::InsertDataLoader::insertData().
StringOffsetT Fragmenter_Namespace::get_buffer_offset | ( | bool | is_varlen_array, |
const StringOffsetT * | index_array, | ||
size_t | index | ||
) |
Definition at line 1182 of file UpdelStorage.cpp.
References CHECK.
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::vacuum_varlen_rows().
|
static |
Definition at line 75 of file UpdelStorage.cpp.
References CHECK, Catalog_Namespace::DBMetadata::dbId, Fragmenter_Namespace::FragmentInfo::fragmentId, Chunk_NS::Chunk::getChunk(), Fragmenter_Namespace::FragmentInfo::getChunkMetadataMapPhysical(), Catalog_Namespace::Catalog::getCurrentDB(), Catalog_Namespace::Catalog::getDataMgr(), Catalog_Namespace::Catalog::getMetadataForColumn(), TableDescriptor::nColumns, and TableDescriptor::tableId.
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::updateColumns().
size_t Fragmenter_Namespace::get_null_padding | ( | bool | is_varlen_array, |
const std::vector< uint64_t > & | frag_offsets, | ||
const StringOffsetT * | index_array, | ||
size_t | fragment_row_count | ||
) |
Definition at line 1119 of file UpdelStorage.cpp.
References CHECK_GT, CHECK_LT, and ArrayNoneEncoder::DEFAULT_NULL_PADDING_SIZE.
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::vacuum_varlen_rows().
std::set<size_t> Fragmenter_Namespace::get_var_len_null_array_indexes | ( | const SQLTypeInfo | sql_type_info, |
const std::vector< uint64_t > & | frag_offsets, | ||
const StringOffsetT * | index_array, | ||
size_t | fragment_row_count | ||
) |
Definition at line 1161 of file UpdelStorage.cpp.
References SQLTypeInfo::get_notnull(), and SQLTypeInfo::is_varlen_array().
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::vacuum_varlen_rows().
size_t Fragmenter_Namespace::indexOf | ( | std::vector< T > & | vec, |
T | val | ||
) |
Definition at line 66 of file InsertDataLoader.cpp.
References CHECK.
Referenced by org.apache.calcite.sql2rel.SqlToRelConverter::collectInsertTargets(), computeRowIndicesOfShards(), copyDataOfShard(), org.apache.calcite.sql.validate.SqlValidatorImpl::expandExprFromJoin(), and com.mapd.utility.db_vendors.PostGis_types::get_wkt().
|
inline |
Definition at line 49 of file UpdelStorage.cpp.
References SQLTypeInfo::is_boolean(), SQLTypeInfo::is_integer(), SQLTypeInfo::is_time(), and SQLTypeInfo::is_timeinterval().
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), and Fragmenter_Namespace::InsertOrderFragmenter::updateColumnMetadata().
bool Fragmenter_Namespace::isDatumVectorData | ( | const ColumnDescriptor * | cd | ) |
Definition at line 78 of file InsertDataLoader.cpp.
References ColumnDescriptor::columnType, and SQLTypeInfo::is_array().
Referenced by compute_row_indices_of_shards(), computeRowIndicesOfShards(), and copyColumnDataOfShard().
bool Fragmenter_Namespace::isStringVectorData | ( | const ColumnDescriptor * | cd | ) |
Definition at line 72 of file InsertDataLoader.cpp.
References ColumnDescriptor::columnType, SQLTypeInfo::get_compression(), SQLTypeInfo::is_geometry(), SQLTypeInfo::is_string(), and kENCODING_NONE.
Referenced by compute_row_indices_of_shards(), computeRowIndicesOfShards(), and copyColumnDataOfShard().
|
static |
Definition at line 1065 of file UpdelStorage.cpp.
References UpdelRoll::addDirtyChunk(), Fragmenter_Namespace::FragmentInfo::fragmentId, UpdelRoll::getChunkMetadata(), and Catalog_Namespace::Catalog::getMetadataForTable().
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::compactRows().
|
static |
Definition at line 1050 of file UpdelStorage.cpp.
References SQLTypeInfo::get_notnull(), is_null(), anonymous_namespace{TypedDataAccessors.h}::set_minmax(), and heavydb.dtypes::T.
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::compactRows().
void Fragmenter_Namespace::shuffleByIndexes | ( | const ColumnDescriptor * | cd, |
const std::vector< size_t > & | indexes, | ||
DataBlockPtr & | data | ||
) |
Definition at line 45 of file SortedOrderFragmenter.cpp.
References DataBlockPtr::arraysPtr, CHECK, ColumnDescriptor::columnType, kARRAY, kBIGINT, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kINT, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kNUMERIC, kPOINT, kPOLYGON, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, DataBlockPtr::numbersPtr, shuffleByIndexesImpl(), and DataBlockPtr::stringsPtr.
Referenced by Fragmenter_Namespace::SortedOrderFragmenter::sortData().
void Fragmenter_Namespace::shuffleByIndexesImpl | ( | const std::vector< size_t > & | indexes, |
T * | buffer | ||
) |
Definition at line 26 of file SortedOrderFragmenter.cpp.
References heavydb.dtypes::T.
Referenced by shuffleByIndexes().
void Fragmenter_Namespace::shuffleByIndexesImpl | ( | const std::vector< size_t > & | indexes, |
std::vector< T > & | buffer | ||
) |
Definition at line 36 of file SortedOrderFragmenter.cpp.
size_t Fragmenter_Namespace::size_of_raw_column | ( | const Catalog_Namespace::Catalog & | cat, |
const ColumnDescriptor * | cd, | ||
const bool | get_logical_size = true |
||
) |
Definition at line 82 of file InsertDataLoader.cpp.
References ColumnDescriptor::columnName, ColumnDescriptor::columnType, SQLTypeInfo::get_compression(), SQLTypeInfo::get_logical_size(), SQLTypeInfo::get_size(), SQLTypeInfo::get_type(), SQLTypeInfo::get_type_name(), kARRAY, kBIGINT, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kENCODING_NONE, kFLOAT, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kNUMERIC, kPOINT, kPOLYGON, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, and kVARCHAR.
Referenced by compute_row_indices_of_shards(), computeRowIndicesOfShards(), and copyColumnDataOfShard().
void Fragmenter_Namespace::sortIndexes | ( | const ColumnDescriptor * | cd, |
std::vector< size_t > & | indexes, | ||
const DataBlockPtr & | data | ||
) |
Definition at line 140 of file SortedOrderFragmenter.cpp.
References DataBlockPtr::arraysPtr, CHECK, ColumnDescriptor::columnType, kARRAY, kBIGINT, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kINT, kNUMERIC, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, DataBlockPtr::numbersPtr, sortIndexesImpl(), and DataBlockPtr::stringsPtr.
Referenced by Fragmenter_Namespace::SortedOrderFragmenter::sortData().
void Fragmenter_Namespace::sortIndexesImpl | ( | std::vector< size_t > & | indexes, |
const T * | buffer | ||
) |
Definition at line 116 of file SortedOrderFragmenter.cpp.
References anonymous_namespace{Utm.h}::a, CHECK, and gpu_enabled::sort().
Referenced by sortIndexes().
void Fragmenter_Namespace::sortIndexesImpl | ( | std::vector< size_t > & | indexes, |
const std::vector< std::string > & | buffer | ||
) |
Definition at line 123 of file SortedOrderFragmenter.cpp.
References anonymous_namespace{Utm.h}::a, and gpu_enabled::sort().
void Fragmenter_Namespace::sortIndexesImpl | ( | std::vector< size_t > & | indexes, |
const std::vector< ArrayDatum > & | buffer | ||
) |
Definition at line 131 of file SortedOrderFragmenter.cpp.
References anonymous_namespace{Utm.h}::a, and gpu_enabled::sort().
|
inline |
Definition at line 42 of file UpdelStorage.cpp.
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::compactRows(), Fragmenter_Namespace::InsertOrderFragmenter::getVacuumOffsets(), and Fragmenter_Namespace::InsertOrderFragmenter::updateColumn().