OmniSciDB
a5dc49c757
|
#include <InternalSystemDataWrapper.h>
Public Member Functions | |
InternalSystemDataWrapper () | |
InternalSystemDataWrapper (const int db_id, const ForeignTable *foreign_table) | |
void | populateChunkMetadata (ChunkMetadataVector &chunk_metadata_vector) override |
void | populateChunkBuffers (const ChunkToBufferMap &required_buffers, const ChunkToBufferMap &optional_buffers, AbstractBuffer *delete_buffer) override |
void | validateServerOptions (const ForeignServer *foreign_server) const override |
void | validateTableOptions (const ForeignTable *foreign_table) const override |
const std::set < std::string_view > & | getSupportedTableOptions () const override |
void | validateUserMappingOptions (const UserMapping *user_mapping, const ForeignServer *foreign_server) const override |
const std::set < std::string_view > & | getSupportedUserMappingOptions () const override |
std::string | getSerializedDataWrapper () const override |
void | restoreDataWrapperInternals (const std::string &file_path, const ChunkMetadataVector &chunk_metadata) override |
bool | isRestored () const override |
Public Member Functions inherited from foreign_storage::ForeignDataWrapper | |
ForeignDataWrapper ()=default | |
virtual | ~ForeignDataWrapper ()=default |
virtual const std::set < std::string > | getAlterableTableOptions () const |
virtual void | validateSchema (const std::list< ColumnDescriptor > &columns) const |
virtual ParallelismLevel | getCachedParallelismLevel () const |
virtual ParallelismLevel | getNonCachedParallelismLevel () const |
virtual bool | isLazyFragmentFetchingEnabled () const |
Protected Member Functions | |
virtual void | initializeObjectsForTable (const std::string &table_name)=0 |
virtual void | populateChunkBuffersForTable (const std::string &table_name, std::map< std::string, import_export::TypedImportBuffer * > &import_buffers)=0 |
Protected Attributes | |
const int | db_id_ |
const ForeignTable * | foreign_table_ |
size_t | row_count_ {0} |
Additional Inherited Members | |
Public Types inherited from foreign_storage::ForeignDataWrapper | |
enum | ParallelismLevel { NONE, INTRA_FRAGMENT, INTER_FRAGMENT } |
Definition at line 34 of file InternalSystemDataWrapper.h.
foreign_storage::InternalSystemDataWrapper::InternalSystemDataWrapper | ( | ) |
Definition at line 67 of file InternalSystemDataWrapper.cpp.
foreign_storage::InternalSystemDataWrapper::InternalSystemDataWrapper | ( | const int | db_id, |
const ForeignTable * | foreign_table | ||
) |
Definition at line 70 of file InternalSystemDataWrapper.cpp.
|
overridevirtual |
Serialize internal state of wrapper into file at given path if implemented
Implements foreign_storage::ForeignDataWrapper.
Definition at line 226 of file InternalSystemDataWrapper.cpp.
|
overridevirtual |
Gets the set of supported table options for the data wrapper.
Implements foreign_storage::ForeignDataWrapper.
Definition at line 82 of file InternalSystemDataWrapper.cpp.
|
overridevirtual |
Gets the set of supported user mapping options for the data wrapper.
Implements foreign_storage::ForeignDataWrapper.
Definition at line 95 of file InternalSystemDataWrapper.cpp.
|
protectedpure virtual |
Implemented in foreign_storage::InternalStorageStatsDataWrapper, foreign_storage::InternalExecutorStatsDataWrapper, foreign_storage::InternalMLModelMetadataDataWrapper, foreign_storage::InternalMemoryStatsDataWrapper, and foreign_storage::InternalCatalogDataWrapper.
Referenced by populateChunkMetadata().
|
overridevirtual |
Implements foreign_storage::ForeignDataWrapper.
Definition at line 234 of file InternalSystemDataWrapper.cpp.
|
overridevirtual |
Populates given chunk buffers identified by chunk keys. All provided chunk buffers are expected to be for the same fragment.
required_buffers | - chunk buffers that must always be populated |
optional_buffers | - chunk buffers that can be optionally populated, if the data wrapper has to scan through chunk data anyways (typically for row wise data formats) |
delete_buffer | - chunk buffer for fragment's delete column, if non-null data wrapper is expected to mark deleted rows in buffer and continue processing |
Implements foreign_storage::ForeignDataWrapper.
Definition at line 186 of file InternalSystemDataWrapper.cpp.
References CHECK, CHECK_EQ, CHUNK_KEY_COLUMN_IDX, CHUNK_KEY_FRAGMENT_IDX, foreign_storage::TextFileBufferParser::convertImportBuffersToDataBlocks(), db_id_, DEBUG_TIMER, foreign_table_, foreign_storage::anonymous_namespace{InternalSystemDataWrapper.cpp}::initialize_chunks(), foreign_storage::anonymous_namespace{InternalSystemDataWrapper.cpp}::initialize_import_buffers(), Catalog_Namespace::SysCatalog::instance(), shared::kInfoSchemaDbName, populateChunkBuffersForTable(), row_count_, and TableDescriptor::tableName.
|
protectedpure virtual |
Implemented in foreign_storage::InternalStorageStatsDataWrapper, foreign_storage::InternalExecutorStatsDataWrapper, foreign_storage::InternalMLModelMetadataDataWrapper, foreign_storage::InternalMemoryStatsDataWrapper, and foreign_storage::InternalCatalogDataWrapper.
Referenced by populateChunkBuffers().
|
overridevirtual |
Populates given chunk metadata vector with metadata for all chunks in related foreign table.
chunk_metadata_vector | - vector that will be populated with chunk metadata |
Implements foreign_storage::ForeignDataWrapper.
Definition at line 163 of file InternalSystemDataWrapper.cpp.
References CHECK, CHECK_EQ, db_id_, foreign_table_, foreign_storage::get_placeholder_metadata(), foreign_storage::ForeignTableSchema::getLogicalColumns(), initializeObjectsForTable(), Catalog_Namespace::SysCatalog::instance(), shared::kInfoSchemaDbName, TableDescriptor::maxFragRows, row_count_, TableDescriptor::tableId, and TableDescriptor::tableName.
|
overridevirtual |
Restore internal state of datawrapper
file_path | - location of file created by serializeMetadata |
chunk_metadata_vector | - vector of chunk metadata recovered from disk |
Implements foreign_storage::ForeignDataWrapper.
Definition at line 230 of file InternalSystemDataWrapper.cpp.
|
overridevirtual |
Checks that the options for the given foreign server object are valid.
foreign_server | - foreign server object containing options to be validated |
Implements foreign_storage::ForeignDataWrapper.
Definition at line 74 of file InternalSystemDataWrapper.cpp.
References CHECK, and foreign_storage::OptionsContainer::options.
|
overridevirtual |
Checks that the options for the given foreign table object are valid.
foreign_table | - foreign table object containing options to be validated |
Implements foreign_storage::ForeignDataWrapper.
Definition at line 79 of file InternalSystemDataWrapper.cpp.
|
overridevirtual |
Checks that the options for the given user mapping object are valid.
user_mapping | - user mapping object containing options to be validated |
Implements foreign_storage::ForeignDataWrapper.
Definition at line 88 of file InternalSystemDataWrapper.cpp.
References CHECK, and foreign_storage::UserMapping::options.
|
protected |
Definition at line 70 of file InternalSystemDataWrapper.h.
Referenced by populateChunkBuffers(), and populateChunkMetadata().
|
protected |
Definition at line 71 of file InternalSystemDataWrapper.h.
Referenced by foreign_storage::InternalCatalogDataWrapper::initializeObjectsForTable(), foreign_storage::InternalMemoryStatsDataWrapper::initializeObjectsForTable(), foreign_storage::InternalMLModelMetadataDataWrapper::initializeObjectsForTable(), foreign_storage::InternalExecutorStatsDataWrapper::initializeObjectsForTable(), populateChunkBuffers(), foreign_storage::InternalCatalogDataWrapper::populateChunkBuffersForTable(), foreign_storage::InternalMemoryStatsDataWrapper::populateChunkBuffersForTable(), foreign_storage::InternalMLModelMetadataDataWrapper::populateChunkBuffersForTable(), foreign_storage::InternalExecutorStatsDataWrapper::populateChunkBuffersForTable(), and populateChunkMetadata().
|
protected |
Definition at line 72 of file InternalSystemDataWrapper.h.
Referenced by foreign_storage::InternalCatalogDataWrapper::initializeObjectsForTable(), foreign_storage::InternalMemoryStatsDataWrapper::initializeObjectsForTable(), foreign_storage::InternalMLModelMetadataDataWrapper::initializeObjectsForTable(), foreign_storage::InternalExecutorStatsDataWrapper::initializeObjectsForTable(), foreign_storage::InternalStorageStatsDataWrapper::initializeObjectsForTable(), populateChunkBuffers(), and populateChunkMetadata().