OmniSciDB
a5dc49c757
|
#include <ForeignDataWrapper.h>
Public Types | |
enum | ParallelismLevel { NONE, INTRA_FRAGMENT, INTER_FRAGMENT } |
Public Member Functions | |
ForeignDataWrapper ()=default | |
virtual | ~ForeignDataWrapper ()=default |
virtual void | populateChunkMetadata (ChunkMetadataVector &chunk_metadata_vector)=0 |
virtual void | populateChunkBuffers (const ChunkToBufferMap &required_buffers, const ChunkToBufferMap &optional_buffers, AbstractBuffer *delete_buffer=nullptr)=0 |
virtual std::string | getSerializedDataWrapper () const =0 |
virtual void | restoreDataWrapperInternals (const std::string &file_path, const ChunkMetadataVector &chunk_metadata)=0 |
virtual bool | isRestored () const =0 |
virtual void | validateServerOptions (const ForeignServer *foreign_server) const =0 |
virtual void | validateTableOptions (const ForeignTable *foreign_table) const =0 |
virtual const std::set < std::string_view > & | getSupportedTableOptions () const =0 |
virtual const std::set < std::string > | getAlterableTableOptions () const |
virtual void | validateUserMappingOptions (const UserMapping *user_mapping, const ForeignServer *foreign_server) const =0 |
virtual const std::set < std::string_view > & | getSupportedUserMappingOptions () const =0 |
virtual void | validateSchema (const std::list< ColumnDescriptor > &columns) const |
virtual ParallelismLevel | getCachedParallelismLevel () const |
virtual ParallelismLevel | getNonCachedParallelismLevel () const |
virtual bool | isLazyFragmentFetchingEnabled () const |
Definition at line 33 of file ForeignDataWrapper.h.
ParallelismLevel describes the desired level of parallelism of the data wrapper. This level controls which optional_buffers
are passed to populateChunkBuffers
with the following behaviour:
NONE - no additional optional buffers are passed in
INTRA_FRAGMENT - additional optional buffers which are in the same fragment as the required buffers
INTER_FRAGMENT - additional optional buffers which may be in different fragments than those of the required buffers
Note, the optional buffers are passed in with the intention of allowing the data wrapper to employ parallelism in retrieving them. Each subsequent level allows for a greater degree of parallelism but does not have to be supported.
Enumerator | |
---|---|
NONE | |
INTRA_FRAGMENT | |
INTER_FRAGMENT |
Definition at line 136 of file ForeignDataWrapper.h.
|
default |
|
virtualdefault |
|
inlinevirtual |
Gets the subset of table options that can be altered for the data wrapper.
Reimplemented in foreign_storage::AbstractFileStorageDataWrapper.
Definition at line 99 of file ForeignDataWrapper.h.
|
inlinevirtual |
Gets the desired level of parallelism for the data wrapper when a cache is in use. This affects the optional buffers that the data wrapper is made aware of during data requests.
Reimplemented in foreign_storage::AbstractTextFileDataWrapper, foreign_storage::ParquetDataWrapper, and foreign_storage::ParquetImporter.
Definition at line 143 of file ForeignDataWrapper.h.
References NONE.
|
inlinevirtual |
Gets the desired level of parallelism for the data wrapper when no cache is in use. This affects the optional buffers that the data wrapper is made aware of during data requests.
Reimplemented in foreign_storage::AbstractTextFileDataWrapper, foreign_storage::ParquetDataWrapper, and foreign_storage::ParquetImporter.
Definition at line 150 of file ForeignDataWrapper.h.
References NONE.
|
pure virtual |
Serialize internal state of wrapper into file at given path if implemented
Implemented in foreign_storage::AbstractTextFileDataWrapper, foreign_storage::ParquetDataWrapper, foreign_storage::InternalSystemDataWrapper, and foreign_storage::ParquetImporter.
|
pure virtual |
Gets the set of supported table options for the data wrapper.
Implemented in foreign_storage::InternalSystemDataWrapper, foreign_storage::CsvDataWrapper, foreign_storage::RegexParserDataWrapper, and foreign_storage::AbstractFileStorageDataWrapper.
|
pure virtual |
Gets the set of supported user mapping options for the data wrapper.
Implemented in foreign_storage::InternalSystemDataWrapper, and foreign_storage::AbstractFileStorageDataWrapper.
|
inlinevirtual |
If true
data wrapper implements a lazy fragment fetching mode. This mode allows requests for fragments to be issued to populateChunks
without the prerequisite that populateChunkMetadata
has successfully finished execution. This is an optimization that has some specific use-cases and is not required.
NOTE: this mode is not guaranteed to work as expected when combined with certain types of refresh modes such as append. This is subject to change in the future, but has no impact on the intended use-cases of this mode.
Reimplemented in foreign_storage::AbstractTextFileDataWrapper.
Definition at line 163 of file ForeignDataWrapper.h.
|
pure virtual |
|
pure virtual |
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 |
Implemented in foreign_storage::AbstractTextFileDataWrapper, foreign_storage::ParquetDataWrapper, foreign_storage::ParquetImporter, and foreign_storage::InternalSystemDataWrapper.
Referenced by anonymous_namespace{ForeignDataImporter.cpp}::import_foreign_data(), and foreign_storage::CachingForeignStorageMgr::populateChunkBuffersSafely().
|
pure virtual |
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 |
Implemented in foreign_storage::AbstractTextFileDataWrapper, foreign_storage::ParquetDataWrapper, foreign_storage::ParquetImporter, and foreign_storage::InternalSystemDataWrapper.
Referenced by anonymous_namespace{ForeignDataImporter.cpp}::metadata_scan().
|
pure virtual |
Restore internal state of datawrapper
file_path | - location of file created by serializeMetadata |
chunk_metadata_vector | - vector of chunk metadata recovered from disk |
Implemented in foreign_storage::AbstractTextFileDataWrapper, foreign_storage::ParquetDataWrapper, foreign_storage::InternalSystemDataWrapper, and foreign_storage::ParquetImporter.
|
inlinevirtual |
Verifies the schema is supported by this foreign table
columns | - column descriptors for this table |
Definition at line 117 of file ForeignDataWrapper.h.
|
pure virtual |
Checks that the options for the given foreign server object are valid.
foreign_server | - foreign server object containing options to be validated |
Implemented in foreign_storage::InternalSystemDataWrapper, and foreign_storage::AbstractFileStorageDataWrapper.
Referenced by foreign_storage::ForeignServer::validateStorageParameters().
|
pure virtual |
Checks that the options for the given foreign table object are valid.
foreign_table | - foreign table object containing options to be validated |
Implemented in foreign_storage::InternalSystemDataWrapper, foreign_storage::CsvDataWrapper, foreign_storage::RegexParserDataWrapper, and foreign_storage::AbstractFileStorageDataWrapper.
|
pure virtual |
Checks that the options for the given user mapping object are valid.
user_mapping | - user mapping object containing options to be validated |
Implemented in foreign_storage::InternalSystemDataWrapper, and foreign_storage::AbstractFileStorageDataWrapper.