Class foreign_storage::InternalSystemDataWrapper

class InternalSystemDataWrapper : public foreign_storage::ForeignDataWrapper

Subclassed by foreign_storage::InternalCatalogDataWrapper, foreign_storage::InternalMemoryStatsDataWrapper, foreign_storage::InternalStorageStatsDataWrapper

Public Functions

InternalSystemDataWrapper()
InternalSystemDataWrapper(const int db_id, const ForeignTable *foreign_table)
void populateChunkMetadata(ChunkMetadataVector &chunk_metadata_vector)

Populates given chunk metadata vector with metadata for all chunks in related foreign table.

Parameters
  • chunk_metadata_vector: - vector that will be populated with chunk metadata

void populateChunkBuffers(const ChunkToBufferMap &required_buffers, const ChunkToBufferMap &optional_buffers, AbstractBuffer *delete_buffer)

Populates given chunk buffers identified by chunk keys. All provided chunk buffers are expected to be for the same fragment.

Parameters
  • 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

void validateServerOptions(const ForeignServer *foreign_server) const

Checks that the options for the given foreign server object are valid.

Parameters
  • foreign_server: - foreign server object containing options to be validated

void validateTableOptions(const ForeignTable *foreign_table) const

Checks that the options for the given foreign table object are valid.

Parameters
  • foreign_table: - foreign table object containing options to be validated

const std::set<std::string_view> &getSupportedTableOptions() const

Gets the set of supported table options for the data wrapper.

void validateUserMappingOptions(const UserMapping *user_mapping, const ForeignServer *foreign_server) const

Checks that the options for the given user mapping object are valid.

Parameters
  • user_mapping: - user mapping object containing options to be validated

const std::set<std::string_view> &getSupportedUserMappingOptions() const

Gets the set of supported user mapping options for the data wrapper.

std::string getSerializedDataWrapper() const

Serialize internal state of wrapper into file at given path if implemented

void restoreDataWrapperInternals(const std::string &file_path, const ChunkMetadataVector &chunk_metadata)

Restore internal state of datawrapper

Parameters
  • file_path: - location of file created by serializeMetadata

  • chunk_metadata_vector: - vector of chunk metadata recovered from disk

bool isRestored() const

Protected 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}