OmniSciDB
0264ff685a
|
Namespaces | |
anonymous_namespace{InsertOrderFragmenter.cpp} | |
Classes | |
class | AbstractFragmenter |
struct | ArrayChunkConverter |
struct | BlockWithColumnId |
struct | ChunkToInsertDataConverter |
struct | DateChunkConverter |
struct | FixedLenArrayChunkConverter |
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... | |
struct | InsertData |
The data to be inserted using the fragment manager. More... | |
struct | InsertDataLoader |
class | InsertOrderFragmenter |
The InsertOrderFragmenter is a child class of AbstractFragmenter, and fragments data in insert order. Likely the default fragmenter. More... | |
class | RowDataProvider |
struct | ScalarChunkConverter |
struct | ShardDataOwner |
class | SortedOrderFragmenter |
struct | StringChunkConverter |
class | TableInfo |
Enumerations | |
enum | FragmenterType { INSERT_ORDER = 0 } |
Functions | |
template<typename SRC > | |
std::vector< std::vector< size_t > > | computeRowIndicesOfShards (size_t shardCount, size_t leafCount, size_t rowCount, SRC *src) |
template<typename T > | |
size_t | indexOf (std::vector< T > &vec, T val) |
bool | isStringVectorData (const ColumnDescriptor *cd) |
bool | isDatumVectorData (const ColumnDescriptor *cd) |
size_t | sizeOfRawColumn (const Catalog_Namespace::Catalog &cat, const ColumnDescriptor *cd) |
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) |
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, int8_t &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) |
stores the type of a child class of AbstractTableFragmenter
Enumerator | |
---|---|
INSERT_ORDER |
Definition at line 44 of file Fragmenter.h.
std::vector<std::vector<size_t> > Fragmenter_Namespace::computeRowIndicesOfShards | ( | size_t | shardCount, |
size_t | leafCount, | ||
size_t | rowCount, | ||
SRC * | src | ||
) |
Definition at line 34 of file InsertDataLoader.cpp.
References SHARD_FOR_KEY.
Referenced by computeRowIndicesOfShards(), and Fragmenter_Namespace::InsertDataLoader::insertData().
std::vector<std::vector<size_t> > Fragmenter_Namespace::computeRowIndicesOfShards | ( | const Catalog_Namespace::Catalog & | cat, |
size_t | leafCount, | ||
InsertData & | insert_data | ||
) |
Definition at line 109 of file InsertDataLoader.cpp.
References CHECK, Fragmenter_Namespace::InsertData::columnIds, computeRowIndicesOfShards(), Fragmenter_Namespace::InsertData::data, Catalog_Namespace::Catalog::getMetadataForTable(), Catalog_Namespace::Catalog::getShardColumnMetadataForTable(), indexOf(), isDatumVectorData(), isStringVectorData(), DataBlockPtr::numbersPtr, Fragmenter_Namespace::InsertData::numRows, sizeOfRawColumn(), and Fragmenter_Namespace::InsertData::tableId.
void Fragmenter_Namespace::copyColumnDataOfShard | ( | const std::vector< size_t > & | rowIndices, |
T * | src, | ||
T * | dst | ||
) |
Definition at line 153 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 | ||
) |
Definition at line 165 of file InsertDataLoader.cpp.
References Fragmenter_Namespace::ShardDataOwner::arrayData, DataBlockPtr::arraysPtr, ColumnDescriptor::columnId, copyColumnDataOfShard(), isDatumVectorData(), isStringVectorData(), DataBlockPtr::numbersPtr, Fragmenter_Namespace::ShardDataOwner::rawData, sizeOfRawColumn(), 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 224 of file InsertDataLoader.cpp.
References Fragmenter_Namespace::ShardDataOwner::arrayData, 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::numRows, Fragmenter_Namespace::ShardDataOwner::rawData, Fragmenter_Namespace::ShardDataOwner::stringData, and Fragmenter_Namespace::InsertData::tableId.
Referenced by Fragmenter_Namespace::InsertDataLoader::insertData().
|
static |
Definition at line 74 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::indexOf | ( | std::vector< T > & | vec, |
T | val | ||
) |
Definition at line 55 of file InsertDataLoader.cpp.
References CHECK.
Referenced by computeRowIndicesOfShards(), and copyDataOfShard().
|
inline |
Definition at line 48 of file UpdelStorage.cpp.
References SQLTypeInfo::is_boolean(), SQLTypeInfo::is_integer(), SQLTypeInfo::is_time(), SQLTypeInfo::is_timeinterval(), and Fragmenter_Namespace::FragmentInfo::unconditionalVacuum_.
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), and Fragmenter_Namespace::InsertOrderFragmenter::updateColumnMetadata().
bool Fragmenter_Namespace::isDatumVectorData | ( | const ColumnDescriptor * | cd | ) |
Definition at line 67 of file InsertDataLoader.cpp.
References ColumnDescriptor::columnType, and SQLTypeInfo::is_array().
Referenced by computeRowIndicesOfShards(), and copyColumnDataOfShard().
bool Fragmenter_Namespace::isStringVectorData | ( | const ColumnDescriptor * | cd | ) |
Definition at line 61 of file InsertDataLoader.cpp.
References ColumnDescriptor::columnType, SQLTypeInfo::get_compression(), SQLTypeInfo::is_geometry(), SQLTypeInfo::is_string(), and kENCODING_NONE.
Referenced by computeRowIndicesOfShards(), and copyColumnDataOfShard().
|
static |
Definition at line 1046 of file UpdelStorage.cpp.
References UpdelRoll::chunkMetadata, UpdelRoll::dirtyChunks, Fragmenter_Namespace::FragmentInfo::getChunkMetadataMapPhysical(), Catalog_Namespace::Catalog::getMetadataForTable(), and UpdelRoll::mutex.
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::compactRows().
|
static |
Definition at line 1031 of file UpdelStorage.cpp.
References SQLTypeInfo::get_notnull(), is_null(), anonymous_namespace{TypedDataAccessors.h}::set_minmax(), and omnisci.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 44 of file SortedOrderFragmenter.cpp.
References DataBlockPtr::arraysPtr, CHECK, ColumnDescriptor::columnType, kARRAY, kBIGINT, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kINT, kLINESTRING, 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 25 of file SortedOrderFragmenter.cpp.
References omnisci.dtypes::T.
Referenced by shuffleByIndexes().
void Fragmenter_Namespace::shuffleByIndexesImpl | ( | const std::vector< size_t > & | indexes, |
std::vector< T > & | buffer | ||
) |
Definition at line 35 of file SortedOrderFragmenter.cpp.
size_t Fragmenter_Namespace::sizeOfRawColumn | ( | const Catalog_Namespace::Catalog & | cat, |
const ColumnDescriptor * | cd | ||
) |
Definition at line 71 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, kMULTIPOLYGON, kNUMERIC, kPOINT, kPOLYGON, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, and kVARCHAR.
Referenced by computeRowIndicesOfShards(), and copyColumnDataOfShard().
void Fragmenter_Namespace::sortIndexes | ( | const ColumnDescriptor * | cd, |
std::vector< size_t > & | indexes, | ||
const DataBlockPtr & | data | ||
) |
Definition at line 137 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 113 of file SortedOrderFragmenter.cpp.
References 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 120 of file SortedOrderFragmenter.cpp.
References gpu_enabled::sort().
void Fragmenter_Namespace::sortIndexesImpl | ( | std::vector< size_t > & | indexes, |
const std::vector< ArrayDatum > & | buffer | ||
) |
Definition at line 128 of file SortedOrderFragmenter.cpp.
References gpu_enabled::sort().
|
inline |
Definition at line 41 of file UpdelStorage.cpp.
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::compactRows(), Fragmenter_Namespace::InsertOrderFragmenter::getVacuumOffsets(), and Fragmenter_Namespace::InsertOrderFragmenter::updateColumn().