31 namespace foreign_storage {
40 std::queue<ParseBufferRequest>
62 mutable std::map<int, std::unique_ptr<std::condition_variable>>
69 : column_id_to_chunk_map(column_id_to_chunk_map)
70 , fragment_id(fragment_id)
71 , delete_buffer(delete_buffer) {
72 for (
const auto& [key, _] : column_id_to_chunk_map) {
75 std::make_unique<std::condition_variable>();
82 return *mutex_it->second;
88 return *var_it->second;
101 const bool disable_cache);
152 void populateChunks(std::map<int, Chunk_NS::Chunk>& column_id_to_chunk_map,
157 const int fragment_id,
159 std::map<int, Chunk_NS::Chunk>& column_id_to_chunk_map);
161 void updateMetadata(std::map<int, Chunk_NS::Chunk>& column_id_to_chunk_map,
165 const std::set<std::string>& rolled_off_files,
166 const std::map<int32_t, const ColumnDescriptor*>& column_by_id);
std::condition_variable & getChunkConditionalVariable(const int col_id) const
void updateRolledOffChunks(const std::set< std::string > &rolled_off_files, const std::map< int32_t, const ColumnDescriptor * > &column_by_id)
const UserMapping * user_mapping_
std::string getSerializedDataWrapper() const override
std::map< ChunkKey, AbstractBuffer * > ChunkToBufferMap
std::map< ChunkKey, std::unique_ptr< ForeignStorageBuffer > > chunk_encoder_buffers_
std::map< int, std::unique_ptr< std::mutex > > column_id_to_chunk_mutex
virtual const TextFileBufferParser & getFileBufferParser() const =0
std::map< int, Chunk_NS::Chunk > & column_id_to_chunk_map
size_t append_start_offset_
size_t residual_buffer_alloc_size
const bool disable_cache_
bool is_first_file_scan_call_
void iterativeFileScan(ChunkMetadataVector &chunk_metadata_vector, IterativeFileScanParameters &file_scan_param)
void populateChunkMetadata(ChunkMetadataVector &chunk_metadata_vector) override
MetadataScanMultiThreadingParams multi_threading_params_
std::map< ChunkKey, std::shared_ptr< ChunkMetadata > > chunk_metadata_map_
void updateMetadata(std::map< int, Chunk_NS::Chunk > &column_id_to_chunk_map, int fragment_id)
virtual std::optional< size_t > getMaxFileCount() const
std::unique_ptr< FileReader > file_reader_
ParallelismLevel getNonCachedParallelismLevel() const override
An AbstractBuffer is a unit of data management for a data manager.
std::unique_ptr< char[]> residual_data
std::mutex & getChunkMutex(const int col_id) const
bool is_file_scan_in_progress_
std::map< int, std::unique_ptr< std::condition_variable > > column_id_to_chunk_conditional_var
const ForeignTable * foreign_table_
size_t residual_buffer_size
void populateChunks(std::map< int, Chunk_NS::Chunk > &column_id_to_chunk_map, int fragment_id, AbstractBuffer *delete_buffer)
ResidualBuffer residual_buffer_
bool isRestored() const override
ParallelismLevel getCachedParallelismLevel() const override
int iterative_scan_last_fragment_id_
AbstractBuffer * delete_buffer
bool isLazyFragmentFetchingEnabled() const override
void populateChunkBuffers(const ChunkToBufferMap &required_buffers, const ChunkToBufferMap &optional_buffers, AbstractBuffer *delete_buffer) override
void restoreDataWrapperInternals(const std::string &file_path, const ChunkMetadataVector &chunk_metadata) override
std::map< int, FileRegions > fragment_id_to_file_regions_map_
IterativeFileScanParameters(std::map< int, Chunk_NS::Chunk > &column_id_to_chunk_map, int32_t fragment_id, AbstractBuffer *delete_buffer)
void populateChunkMapForColumns(const std::set< const ColumnDescriptor * > &columns, const int fragment_id, const ChunkToBufferMap &buffers, std::map< int, Chunk_NS::Chunk > &column_id_to_chunk_map)
std::mutex delete_buffer_mutex
AbstractTextFileDataWrapper()