Class Fragmenter_Namespace::AbstractFragmenter¶
-
class
AbstractFragmenter
¶ Subclassed by Fragmenter_Namespace::InsertOrderFragmenter
Public Functions
-
virtual
~AbstractFragmenter
()¶
-
virtual size_t
getNumFragments
() = 0¶ Should get the partitions(fragments) where at least one tuple could satisfy the (optional) provided predicate, given any statistics on data distribution the partitioner keeps. May also prune the predicate.
returns the number of fragments in a table
-
virtual void
insertData
(InsertData &insert_data_struct) = 0¶ Given data wrapped in an InsertData struct, inserts it into the correct partitions with locks and checkpoints.
-
virtual void
insertChunks
(const InsertChunks &insert_chunk) = 0¶ Insert chunks into minimal number of fragments.
- Parameters
insert_chunk
: - the chunks to insert
-
virtual void
insertDataNoCheckpoint
(InsertData &insert_data_struct) = 0¶ Given data wrapped in an InsertData struct, inserts it into the correct partitions No locks and checkpoints taken needs to be managed externally.
-
virtual void
insertChunksNoCheckpoint
(const InsertChunks &insert_chunk) = 0¶ Insert chunks into minimal number of fragments; no locks or checkpoints taken.
- Parameters
chunk
: - the chunks to insert
-
virtual void
dropFragmentsToSize
(const size_t maxRows) = 0¶ Will truncate table to less than maxRows by dropping fragments.
-
virtual void
updateChunkStats
(const ColumnDescriptor *cd, std::unordered_map<int, ChunkStats> &stats_map, std::optional<Data_Namespace::MemoryLevel> memory_level) = 0¶ Update chunk stats.
-
virtual FragmentInfo *
getFragmentInfo
(const int fragment_id) const = 0¶ Retrieve the fragment info object for an individual fragment for editing.
-
virtual int
getFragmenterId
() = 0¶ Gets the id of the partitioner.
-
virtual std::string
getFragmenterType
() = 0¶ Gets the string type of the partitioner.
-
virtual size_t
getNumRows
() = 0¶
-
virtual void
setNumRows
(const size_t numTuples) = 0¶
-
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¶
-
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
updateColumn
(const Catalog_Namespace::Catalog *catalog, const TableDescriptor *td, const ColumnDescriptor *cd, const int fragment_id, const std::vector<uint64_t> &frag_offsets, const ScalarTargetValue &rhs_value, const SQLTypeInfo &rhs_type, const Data_Namespace::MemoryLevel memory_level, UpdelRoll &updel_roll) = 0¶
-
virtual void
updateMetadata
(const Catalog_Namespace::Catalog *catalog, const MetaDataKey &key, UpdelRoll &updel_roll) = 0¶
-
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 void
dropColumns
(const std::vector<int> &columnIds) = 0¶
-
virtual bool
hasDeletedRows
(const int delete_column_id) = 0¶ Iterates through chunk metadata to return whether any rows have been deleted.
Updates the metadata for a column chunk.
- Parameters
cd
: - ColumnDescriptor for the columnfragment_id
: - Fragment id of the chunk within the columnmetadata
: - shared_ptr of the metadata to update column chunk with
-
virtual void
resetSizesFromFragments
() = 0¶ Resets the fragmenter’s size related metadata using the internal fragment info vector. This is typically done after operations, such as vacuuming, which can change fragment sizes.
-
virtual