OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fragmenter_Namespace::AbstractFragmenter Class Referenceabstract

#include <AbstractFragmenter.h>

+ Inheritance diagram for Fragmenter_Namespace::AbstractFragmenter:

Public Member 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. More...
 
virtual TableInfo getFragmentsForQuery ()=0
 Get all fragments for the current table. More...
 
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. More...
 
virtual void insertChunks (const InsertChunks &insert_chunk)=0
 Insert chunks into minimal number of fragments. More...
 
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. More...
 
virtual void insertChunksNoCheckpoint (const InsertChunks &insert_chunk)=0
 Insert chunks into minimal number of fragments; no locks or checkpoints taken. More...
 
virtual void dropFragmentsToSize (const size_t maxRows)=0
 Will truncate table to less than maxRows by dropping fragments. More...
 
virtual void updateChunkStats (const ColumnDescriptor *cd, std::unordered_map< int, ChunkStats > &stats_map, std::optional< Data_Namespace::MemoryLevel > memory_level)=0
 Update chunk stats. More...
 
virtual FragmentInfogetFragmentInfo (const int fragment_id) const =0
 Retrieve the fragment info object for an individual fragment for editing. More...
 
virtual int getFragmenterId ()=0
 Gets the id of the partitioner. More...
 
virtual std::string getFragmenterType ()=0
 Gets the string type of the partitioner. More...
 
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 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 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 const std::vector
< uint64_t > 
getVacuumOffsets (const std::shared_ptr< Chunk_NS::Chunk > &chunk)=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. More...
 
virtual void updateColumnChunkMetadata (const ColumnDescriptor *cd, const int fragment_id, const std::shared_ptr< ChunkMetadata > metadata)=0
 Updates the metadata for a column chunk. More...
 
virtual void resetSizesFromFragments ()=0
 

Detailed Description

Definition at line 110 of file AbstractFragmenter.h.

Constructor & Destructor Documentation

virtual Fragmenter_Namespace::AbstractFragmenter::~AbstractFragmenter ( )
inlinevirtual

Definition at line 112 of file AbstractFragmenter.h.

112 {}

Member Function Documentation

virtual void Fragmenter_Namespace::AbstractFragmenter::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 
)
pure virtual
virtual void Fragmenter_Namespace::AbstractFragmenter::dropColumns ( const std::vector< int > &  columnIds)
pure virtual
virtual void Fragmenter_Namespace::AbstractFragmenter::dropFragmentsToSize ( const size_t  maxRows)
pure virtual

Will truncate table to less than maxRows by dropping fragments.

Implemented in Fragmenter_Namespace::InsertOrderFragmenter.

virtual int Fragmenter_Namespace::AbstractFragmenter::getFragmenterId ( )
pure virtual

Gets the id of the partitioner.

Implemented in Fragmenter_Namespace::InsertOrderFragmenter.

virtual std::string Fragmenter_Namespace::AbstractFragmenter::getFragmenterType ( )
pure virtual

Gets the string type of the partitioner.

Todo:
have a method returning the enum type?

Implemented in Fragmenter_Namespace::InsertOrderFragmenter.

virtual FragmentInfo* Fragmenter_Namespace::AbstractFragmenter::getFragmentInfo ( const int  fragment_id) const
pure virtual

Retrieve the fragment info object for an individual fragment for editing.

Implemented in Fragmenter_Namespace::InsertOrderFragmenter.

virtual TableInfo Fragmenter_Namespace::AbstractFragmenter::getFragmentsForQuery ( )
pure virtual

Get all fragments for the current table.

Implemented in Fragmenter_Namespace::InsertOrderFragmenter.

virtual size_t Fragmenter_Namespace::AbstractFragmenter::getNumFragments ( )
pure virtual

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

Implemented in Fragmenter_Namespace::InsertOrderFragmenter.

virtual size_t Fragmenter_Namespace::AbstractFragmenter::getNumRows ( )
pure virtual
virtual const std::vector<uint64_t> Fragmenter_Namespace::AbstractFragmenter::getVacuumOffsets ( const std::shared_ptr< Chunk_NS::Chunk > &  chunk)
pure virtual
virtual bool Fragmenter_Namespace::AbstractFragmenter::hasDeletedRows ( const int  delete_column_id)
pure virtual

Iterates through chunk metadata to return whether any rows have been deleted.

Implemented in Fragmenter_Namespace::InsertOrderFragmenter.

virtual void Fragmenter_Namespace::AbstractFragmenter::insertChunks ( const InsertChunks insert_chunk)
pure virtual

Insert chunks into minimal number of fragments.

Parameters
insert_chunk- the chunks to insert

Implemented in Fragmenter_Namespace::InsertOrderFragmenter.

virtual void Fragmenter_Namespace::AbstractFragmenter::insertChunksNoCheckpoint ( const InsertChunks insert_chunk)
pure virtual

Insert chunks into minimal number of fragments; no locks or checkpoints taken.

Parameters
chunk- the chunks to insert

Implemented in Fragmenter_Namespace::InsertOrderFragmenter.

virtual void Fragmenter_Namespace::AbstractFragmenter::insertData ( InsertData insert_data_struct)
pure virtual

Given data wrapped in an InsertData struct, inserts it into the correct partitions with locks and checkpoints.

Implemented in Fragmenter_Namespace::InsertOrderFragmenter, and Fragmenter_Namespace::SortedOrderFragmenter.

virtual void Fragmenter_Namespace::AbstractFragmenter::insertDataNoCheckpoint ( InsertData insert_data_struct)
pure virtual

Given data wrapped in an InsertData struct, inserts it into the correct partitions No locks and checkpoints taken needs to be managed externally.

Implemented in Fragmenter_Namespace::InsertOrderFragmenter, and Fragmenter_Namespace::SortedOrderFragmenter.

virtual void Fragmenter_Namespace::AbstractFragmenter::resetSizesFromFragments ( )
pure virtual

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.

Implemented in Fragmenter_Namespace::InsertOrderFragmenter.

virtual void Fragmenter_Namespace::AbstractFragmenter::setNumRows ( const size_t  numTuples)
pure virtual
virtual void Fragmenter_Namespace::AbstractFragmenter::updateChunkStats ( const ColumnDescriptor cd,
std::unordered_map< int, ChunkStats > &  stats_map,
std::optional< Data_Namespace::MemoryLevel memory_level 
)
pure virtual

Update chunk stats.

Implemented in Fragmenter_Namespace::InsertOrderFragmenter.

virtual std::optional<ChunkUpdateStats> Fragmenter_Namespace::AbstractFragmenter::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 
)
pure virtual
virtual void Fragmenter_Namespace::AbstractFragmenter::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 
)
pure virtual
virtual void Fragmenter_Namespace::AbstractFragmenter::updateColumnChunkMetadata ( const ColumnDescriptor cd,
const int  fragment_id,
const std::shared_ptr< ChunkMetadata metadata 
)
pure virtual

Updates the metadata for a column chunk.

Parameters
cd- ColumnDescriptor for the column
fragment_id- Fragment id of the chunk within the column
metadata- shared_ptr of the metadata to update column chunk with

Implemented in Fragmenter_Namespace::InsertOrderFragmenter.

virtual void Fragmenter_Namespace::AbstractFragmenter::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 
)
pure virtual
virtual void Fragmenter_Namespace::AbstractFragmenter::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 
)
pure virtual
virtual void Fragmenter_Namespace::AbstractFragmenter::updateMetadata ( const Catalog_Namespace::Catalog catalog,
const MetaDataKey key,
UpdelRoll updel_roll 
)
pure virtual

The documentation for this class was generated from the following file: