OmniSciDB
a5dc49c757
|
#include <AbstractFileStorageDataWrapper.h>
Public Member Functions | |
AbstractFileStorageDataWrapper () | |
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 |
const std::set< std::string > | getAlterableTableOptions () const override |
Public Member Functions inherited from foreign_storage::ForeignDataWrapper | |
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 | validateSchema (const std::list< ColumnDescriptor > &columns) const |
virtual ParallelismLevel | getCachedParallelismLevel () const |
virtual ParallelismLevel | getNonCachedParallelismLevel () const |
virtual bool | isLazyFragmentFetchingEnabled () const |
Static Public Member Functions | |
static shared::FilePathOptions | getFilePathOptions (const ForeignTable *foreign_table) |
Static Public Attributes | |
static const std::string | STORAGE_TYPE_KEY = "STORAGE_TYPE" |
static const std::string | BASE_PATH_KEY = "BASE_PATH" |
static const std::string | FILE_PATH_KEY = "FILE_PATH" |
static const std::string | REGEX_PATH_FILTER_KEY = "REGEX_PATH_FILTER" |
static const std::string | LOCAL_FILE_STORAGE_TYPE = "LOCAL_FILE" |
static const std::string | S3_STORAGE_TYPE = "AWS_S3" |
static const std::string | FILE_SORT_ORDER_BY_KEY = shared::FILE_SORT_ORDER_BY_KEY |
static const std::string | FILE_SORT_REGEX_KEY = shared::FILE_SORT_REGEX_KEY |
static const std::string | ALLOW_FILE_ROLL_OFF_KEY = "ALLOW_FILE_ROLL_OFF" |
static const std::string | THREADS_KEY = "THREADS" |
static const std::array < std::string, 1 > | supported_storage_types |
Static Protected Member Functions | |
static std::string | getFullFilePath (const ForeignTable *foreign_table) |
Returns the path to the source file/dir of the table. Depending on options this may result from a concatenation of server and table path options. More... | |
static bool | allowFileRollOff (const ForeignTable *foreign_table) |
Static Private Member Functions | |
static void | validateFilePath (const ForeignTable *foreign_table) |
static void | validateFilePathOptionKey (const ForeignTable *foreign_table) |
static void | validateFileRollOffOption (const ForeignTable *foreign_table) |
Static Private Attributes | |
static const std::set < std::string_view > | supported_table_options_ |
static const std::set < std::string_view > | supported_server_options_ |
static const std::set < std::string_view > | supported_user_mapping_options_ {} |
Additional Inherited Members | |
Public Types inherited from foreign_storage::ForeignDataWrapper | |
enum | ParallelismLevel { NONE, INTRA_FRAGMENT, INTER_FRAGMENT } |
Definition at line 11 of file AbstractFileStorageDataWrapper.h.
foreign_storage::AbstractFileStorageDataWrapper::AbstractFileStorageDataWrapper | ( | ) |
Definition at line 26 of file AbstractFileStorageDataWrapper.cpp.
|
staticprotected |
Definition at line 212 of file AbstractFileStorageDataWrapper.cpp.
References ALLOW_FILE_ROLL_OFF_KEY, CHECK, foreign_storage::anonymous_namespace{AbstractFileStorageDataWrapper.cpp}::get_file_roll_off_value(), foreign_storage::OptionsContainer::getOption(), and UNREACHABLE.
Referenced by foreign_storage::ParquetDataWrapper::addNewFile(), foreign_storage::ParquetDataWrapper::fetchChunkMetadata(), foreign_storage::ParquetDataWrapper::isNewFile(), and foreign_storage::AbstractTextFileDataWrapper::populateChunkMetadata().
|
overridevirtual |
Gets the subset of table options that can be altered for the data wrapper.
Reimplemented from foreign_storage::ForeignDataWrapper.
Definition at line 225 of file AbstractFileStorageDataWrapper.cpp.
References ALLOW_FILE_ROLL_OFF_KEY.
|
static |
Definition at line 171 of file AbstractFileStorageDataWrapper.cpp.
References FILE_SORT_ORDER_BY_KEY, FILE_SORT_REGEX_KEY, foreign_storage::OptionsContainer::getOption(), and REGEX_PATH_FILTER_KEY.
Referenced by foreign_storage::ParquetDataWrapper::getAllFilePaths(), foreign_storage::AbstractTextFileDataWrapper::iterativeFileScan(), foreign_storage::AbstractTextFileDataWrapper::populateChunkMetadata(), and validateTableOptions().
|
staticprotected |
Returns the path to the source file/dir of the table. Depending on options this may result from a concatenation of server and table path options.
Definition at line 113 of file AbstractFileStorageDataWrapper.cpp.
References foreign_storage::anonymous_namespace{AbstractFileStorageDataWrapper.cpp}::append_file_path(), BASE_PATH_KEY, CHECK, FILE_PATH_KEY, foreign_storage::ForeignTable::foreign_server, foreign_storage::OptionsContainer::getOption(), LOCAL_FILE_STORAGE_TYPE, generate_TableFunctionsFactory_init::separator, and STORAGE_TYPE_KEY.
Referenced by foreign_storage::ParquetDataWrapper::getAllFilePaths(), foreign_storage::ParquetImporter::getAllFilePaths(), foreign_storage::ParquetDataWrapper::getDataPreview(), foreign_storage::AbstractTextFileDataWrapper::iterativeFileScan(), foreign_storage::AbstractTextFileDataWrapper::populateChunkMetadata(), foreign_storage::AbstractTextFileDataWrapper::populateChunks(), foreign_storage::AbstractTextFileDataWrapper::restoreDataWrapperInternals(), and validateFilePath().
|
overridevirtual |
Gets the set of supported table options for the data wrapper.
Implements foreign_storage::ForeignDataWrapper.
Reimplemented in foreign_storage::CsvDataWrapper, and foreign_storage::RegexParserDataWrapper.
Definition at line 66 of file AbstractFileStorageDataWrapper.cpp.
References supported_table_options_.
Referenced by foreign_storage::CsvDataWrapper::getAllCsvTableOptions(), and foreign_storage::RegexParserDataWrapper::getAllRegexTableOptions().
|
overridevirtual |
Gets the set of supported user mapping options for the data wrapper.
Implements foreign_storage::ForeignDataWrapper.
Definition at line 79 of file AbstractFileStorageDataWrapper.cpp.
References supported_user_mapping_options_.
|
staticprivate |
Definition at line 83 of file AbstractFileStorageDataWrapper.cpp.
References foreign_storage::ForeignTable::foreign_server, getFullFilePath(), ddl_utils::IMPORT, LOCAL_FILE_STORAGE_TYPE, foreign_storage::OptionsContainer::options, STORAGE_TYPE_KEY, and ddl_utils::validate_allowed_file_path().
Referenced by validateTableOptions().
|
staticprivate |
Definition at line 153 of file AbstractFileStorageDataWrapper.cpp.
References BASE_PATH_KEY, CHECK, FILE_PATH_KEY, foreign_storage::ForeignTable::foreign_server, foreign_storage::OptionsContainer::getOption(), LOCAL_FILE_STORAGE_TYPE, STORAGE_TYPE_KEY, TableDescriptor::tableName, foreign_storage::anonymous_namespace{AbstractFileStorageDataWrapper.cpp}::throw_file_path_error(), and UNREACHABLE.
Referenced by validateTableOptions().
|
staticprivate |
Definition at line 196 of file AbstractFileStorageDataWrapper.cpp.
References ALLOW_FILE_ROLL_OFF_KEY, foreign_storage::anonymous_namespace{AbstractFileStorageDataWrapper.cpp}::get_file_roll_off_value(), and foreign_storage::ForeignTable::isAppendMode().
Referenced by validateTableOptions().
|
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 28 of file AbstractFileStorageDataWrapper.cpp.
References shared::contains(), g_enable_s3_fsi, join(), foreign_storage::OptionsContainer::options, S3_STORAGE_TYPE, STORAGE_TYPE_KEY, supported_server_options_, and supported_storage_types.
|
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.
Reimplemented in foreign_storage::CsvDataWrapper, and foreign_storage::RegexParserDataWrapper.
Definition at line 57 of file AbstractFileStorageDataWrapper.cpp.
References getFilePathOptions(), shared::validate_sort_options(), validateFilePath(), validateFilePathOptionKey(), and validateFileRollOffOption().
Referenced by foreign_storage::CsvDataWrapper::validateTableOptions(), and foreign_storage::RegexParserDataWrapper::validateTableOptions().
|
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 70 of file AbstractFileStorageDataWrapper.cpp.
References foreign_storage::ForeignServer::data_wrapper_type.
|
inlinestatic |
Definition at line 38 of file AbstractFileStorageDataWrapper.h.
Referenced by allowFileRollOff(), foreign_storage::anonymous_namespace{AbstractFileStorageDataWrapper.cpp}::get_file_roll_off_value(), getAlterableTableOptions(), and validateFileRollOffOption().
|
inlinestatic |
Definition at line 31 of file AbstractFileStorageDataWrapper.h.
Referenced by getFullFilePath(), Catalog_Namespace::Catalog::initializeSystemServers(), and validateFilePathOptionKey().
|
inlinestatic |
Definition at line 32 of file AbstractFileStorageDataWrapper.h.
Referenced by getFullFilePath(), and validateFilePathOptionKey().
|
inlinestatic |
Definition at line 36 of file AbstractFileStorageDataWrapper.h.
Referenced by foreign_storage::ForeignDataWrapperFactory::createForeignTableProxy(), and getFilePathOptions().
|
inlinestatic |
Definition at line 37 of file AbstractFileStorageDataWrapper.h.
Referenced by foreign_storage::ForeignDataWrapperFactory::createForeignTableProxy(), and getFilePathOptions().
|
inlinestatic |
Definition at line 34 of file AbstractFileStorageDataWrapper.h.
Referenced by Catalog_Namespace::Catalog::createDefaultServersIfNotExists(), foreign_storage::ForeignDataWrapperFactory::createForeignServerProxy(), foreign_storage::ParquetDataWrapper::getAllFilePaths(), getFullFilePath(), foreign_storage::anonymous_namespace{AbstractTextFileDataWrapper.cpp}::initialize_non_append_mode_scan(), Catalog_Namespace::Catalog::initializeSystemServers(), foreign_storage::ParquetDataWrapper::ParquetDataWrapper(), foreign_storage::ParquetImporter::ParquetImporter(), foreign_storage::AbstractTextFileDataWrapper::populateChunkMetadata(), foreign_storage::AbstractTextFileDataWrapper::populateChunks(), foreign_storage::AbstractTextFileDataWrapper::restoreDataWrapperInternals(), validateFilePath(), and validateFilePathOptionKey().
|
inlinestatic |
Definition at line 33 of file AbstractFileStorageDataWrapper.h.
Referenced by foreign_storage::ForeignDataWrapperFactory::createForeignTableProxy(), and getFilePathOptions().
|
inlinestatic |
Definition at line 35 of file AbstractFileStorageDataWrapper.h.
Referenced by foreign_storage::Csv::validate_and_get_is_s3_select(), foreign_storage::CsvDataWrapper::validateAndGetIsS3Select(), and validateServerOptions().
|
inlinestatic |
Definition at line 30 of file AbstractFileStorageDataWrapper.h.
Referenced by Catalog_Namespace::Catalog::createDefaultServersIfNotExists(), foreign_storage::ForeignDataWrapperFactory::createForeignServerProxy(), foreign_storage::ParquetDataWrapper::getAllFilePaths(), getFullFilePath(), foreign_storage::anonymous_namespace{AbstractTextFileDataWrapper.cpp}::initialize_non_append_mode_scan(), Catalog_Namespace::Catalog::initializeSystemServers(), foreign_storage::ParquetDataWrapper::ParquetDataWrapper(), foreign_storage::ParquetImporter::ParquetImporter(), foreign_storage::AbstractTextFileDataWrapper::populateChunkMetadata(), foreign_storage::AbstractTextFileDataWrapper::populateChunks(), foreign_storage::AbstractTextFileDataWrapper::restoreDataWrapperInternals(), foreign_storage::Csv::validate_and_get_is_s3_select(), foreign_storage::CsvDataWrapper::validateAndGetIsS3Select(), validateFilePath(), validateFilePathOptionKey(), and validateServerOptions().
|
staticprivate |
Definition at line 63 of file AbstractFileStorageDataWrapper.h.
Referenced by validateServerOptions().
|
inlinestatic |
Definition at line 41 of file AbstractFileStorageDataWrapper.h.
Referenced by validateServerOptions().
|
staticprivate |
Definition at line 62 of file AbstractFileStorageDataWrapper.h.
Referenced by getSupportedTableOptions().
|
staticprivate |
Definition at line 64 of file AbstractFileStorageDataWrapper.h.
Referenced by getSupportedUserMappingOptions().
|
inlinestatic |
Definition at line 39 of file AbstractFileStorageDataWrapper.h.
Referenced by foreign_storage::ForeignDataWrapperFactory::createForeignTableProxy(), foreign_storage::get_num_threads(), foreign_storage::CsvFileBufferParser::validateAndGetCopyParams(), and foreign_storage::RegexFileBufferParser::validateAndGetCopyParams().