26 #include <boost/variant.hpp>
45 namespace Data_Namespace {
47 class AbstractDataMgr;
50 namespace import_export {
54 namespace Catalog_Namespace {
60 namespace Fragmenter_Namespace {
70 virtual std::vector<TargetValue>
getEntryAt(
const size_t index)
const = 0;
76 double max_double{std::numeric_limits<double>::lowest()};
95 std::shared_ptr<Chunk_NS::Chunk>
chunk;
153 std::unordered_map</*fragment_id*/ int, ChunkStats>& stats_map,
154 std::optional<Data_Namespace::MemoryLevel> memory_level) = 0;
173 virtual void setNumRows(
const size_t numTuples) = 0;
179 const int fragment_id,
180 const std::vector<uint64_t>& frag_offsets,
181 const std::vector<ScalarTargetValue>& rhs_values,
188 const int fragmentId,
189 const std::vector<TargetMetaInfo> sourceMetaInfo,
190 const std::vector<const ColumnDescriptor*> columnDescriptors,
192 const size_t indexOffFragmentOffsetColumn,
195 Executor* executor) = 0;
200 const int fragment_id,
201 const std::vector<uint64_t>& frag_offsets,
209 std::shared_ptr<Chunk_NS::Chunk> chunk,
220 const int fragmentId,
221 const std::vector<uint64_t>& fragOffsets,
226 const std::shared_ptr<Chunk_NS::Chunk>& chunk) = 0;
228 virtual void dropColumns(
const std::vector<int>& columnIds) = 0;
242 const int fragment_id,
243 const std::shared_ptr<ChunkMetadata> metadata) = 0;
std::shared_ptr< Chunk_NS::Chunk > chunk
UpdateValuesStats new_values_stats
int64_t fragment_rows_count
class for a per-database catalog. also includes metadata for the current database and the current use...
virtual std::string getFragmenterType()=0
Gets the string type of the partitioner.
virtual std::optional< ChunkUpdateStats > updateColumn(const Catalog_Namespace::Catalog *catalog, const TableDescriptor *td, const ColumnDescriptor *cd, const int fragment_id, const std::vector< uint64_t > &frag_offsets, const std::vector< ScalarTargetValue > &rhs_values, const SQLTypeInfo &rhs_type, const Data_Namespace::MemoryLevel memory_level, UpdelRoll &updel_roll)=0
std::pair< const TableDescriptor *, Fragmenter_Namespace::FragmentInfo * > MetaDataKey
virtual std::vector< TargetValue > getTranslatedEntryAt(const size_t index) const =0
virtual bool hasDeletedRows(const int delete_column_id)=0
Iterates through chunk metadata to return whether any rows have been deleted.
Constants for Builtin SQL Types supported by OmniSci.
virtual void insertData(InsertData &insert_data_struct)=0
Given data wrapped in an InsertData struct, inserts it into the correct partitions with locks and che...
virtual void dropColumns(const std::vector< int > &columnIds)=0
virtual ~AbstractFragmenter()
virtual void dropFragmentsToSize(const size_t maxRows)=0
Will truncate table to less than maxRows by dropping fragments.
virtual void compactRows(const Catalog_Namespace::Catalog *catalog, const TableDescriptor *td, const int fragmentId, const std::vector< uint64_t > &fragOffsets, const Data_Namespace::MemoryLevel memoryLevel, UpdelRoll &updelRoll)=0
virtual const std::vector< uint64_t > getVacuumOffsets(const std::shared_ptr< Chunk_NS::Chunk > &chunk)=0
virtual TableInfo getFragmentsForQuery()=0
Should get the partitions(fragments) where at least one tuple could satisfy the (optional) provided p...
virtual FragmentInfo * getFragmentInfo(const int fragment_id) const =0
Retrieve the fragment info object for an individual fragment for editing.
Used by Fragmenter classes to store info about each fragment - the fragment id and number of tuples(r...
virtual size_t const getEntryCount() const =0
An AbstractBuffer is a unit of data management for a data manager.
virtual int getFragmenterId()=0
Gets the id of the partitioner.
specifies the content in-memory of a row in the column metadata table
virtual void updateColumnChunkMetadata(const ColumnDescriptor *cd, const int fragment_id, const std::shared_ptr< ChunkMetadata > metadata)=0
Updates the metadata for a column chunk.
virtual void updateColumnMetadata(const ColumnDescriptor *cd, FragmentInfo &fragment, std::shared_ptr< Chunk_NS::Chunk > chunk, const UpdateValuesStats &update_values_stats, const SQLTypeInfo &rhs_type, UpdelRoll &updel_roll)=0
virtual void setNumRows(const size_t numTuples)=0
virtual void updateMetadata(const Catalog_Namespace::Catalog *catalog, const MetaDataKey &key, UpdelRoll &updel_roll)=0
virtual size_t getNumRows()=0
virtual StringDictionaryProxy * getLiteralDictionary() const =0
virtual void updateColumns(const Catalog_Namespace::Catalog *catalog, const TableDescriptor *td, const int fragmentId, const std::vector< TargetMetaInfo > sourceMetaInfo, const std::vector< const ColumnDescriptor * > columnDescriptors, const RowDataProvider &sourceDataProvider, const size_t indexOffFragmentOffsetColumn, const Data_Namespace::MemoryLevel memoryLevel, UpdelRoll &updelRoll, Executor *executor)=0
virtual void updateChunkStats(const ColumnDescriptor *cd, std::unordered_map< int, ChunkStats > &stats_map, std::optional< Data_Namespace::MemoryLevel > memory_level)=0
Update chunk stats.
FileBuffer Chunk
A Chunk is the fundamental unit of execution in Map-D.
The data to be inserted using the fragment manager.
int64_t updated_rows_count
Executor(const ExecutorId id, const size_t block_size_x, const size_t grid_size_x, const size_t max_gpu_slab_size, const std::string &debug_dir, const std::string &debug_file)
virtual std::vector< TargetValue > getEntryAt(const size_t index) const =0
virtual void insertDataNoCheckpoint(InsertData &insert_data_struct)=0
Given data wrapped in an InsertData struct, inserts it into the correct partitions No locks and check...
UpdateValuesStats old_values_stats
virtual size_t const getRowCount() const =0
boost::variant< int64_t, double, float, NullableString > ScalarTargetValue