Column Store
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
GenericQuery::GenericDataGenerator Class Reference

#include <GenericGenerator.h>

Inheritance diagram for GenericQuery::GenericDataGenerator:
Inheritance graph
Collaboration diagram for GenericQuery::GenericDataGenerator:
Collaboration graph

Classes

struct  DataGeneraterJoin
 helper structure to efficiently process joins More...
 

Public Member Functions

 GenericDataGenerator (GenericQueryBuilder builder)
 Construct a new Generic Data Generator object. More...
 
bool hasNext ()
 check if a record is available More...
 
DataRecord next ()
 generates a new record More...
 
- Public Member Functions inherited from ColumnStore::DataGeneratorInterface
Metadata getMetadata () const
 Interface for relational data sources. More...
 
virtual std::vector< DataRecordnextBatch (int batchSize)
 Helper function to return batch of records. More...
 
void print (int recordCount=-1)
 Print the data. More...
 
virtual ~DataGeneratorInterface ()
 Destroy the Data Generator Interface object. More...
 

Private Member Functions

DataRecord _getNext ()
 internal function to process and generate next valid record More...
 
void _setNext ()
 internal function to set the next valid record More...
 
DataRecord _getCandidateNext ()
 Gets the next candidate record. More...
 

Private Attributes

GenericQueryBuilder builder
 builder object from which we are generating data More...
 
RecordValidator recordValidator
 
DataSource baseSource
 
std::vector< int > baseIndices
 List of column indices to extract values from base source records. More...
 
bool _hasNext = false
 
DataRecord nextRecord
 
std::vector< DataGeneraterJoinjoins
 List of joins. More...
 

Additional Inherited Members

- Protected Attributes inherited from ColumnStore::DataGeneratorInterface
Metadata metadata
 metadata for processing queries More...
 

Constructor & Destructor Documentation

◆ GenericDataGenerator()

GenericQuery::GenericDataGenerator::GenericDataGenerator ( GenericQueryBuilder  builder)

Construct a new Generic Data Generator object.

The generator processes all column data and maps it to column indices for efficiency. All joined data sources are loaded into memory in the constructor

Parameters
builderobject to constuct generator from
Here is the call graph for this function:

Member Function Documentation

◆ _getCandidateNext()

DataRecord GenericQuery::GenericDataGenerator::_getCandidateNext ( )
private

Gets the next candidate record.

Gets the next record from base source. Applies join on the join map data. This function does not perform record validation.

Returns
DataRecord
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _getNext()

DataRecord GenericQuery::GenericDataGenerator::_getNext ( )
private

internal function to process and generate next valid record

Returns
DataRecord
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _setNext()

void GenericQuery::GenericDataGenerator::_setNext ( )
private

internal function to set the next valid record

If no valid record is found, it sets _hasNext to false

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasNext()

bool GenericQuery::GenericDataGenerator::hasNext ( )
virtual

check if a record is available

Returns
true
false

Implements ColumnStore::DataGeneratorInterface.

Here is the caller graph for this function:

◆ next()

DataRecord GenericQuery::GenericDataGenerator::next ( )
virtual

generates a new record

Returns
DataRecord

Implements ColumnStore::DataGeneratorInterface.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _hasNext

bool GenericQuery::GenericDataGenerator::_hasNext = false
private

◆ baseIndices

std::vector<int> GenericQuery::GenericDataGenerator::baseIndices
private

List of column indices to extract values from base source records.

◆ baseSource

DataSource GenericQuery::GenericDataGenerator::baseSource
private

◆ builder

GenericQueryBuilder GenericQuery::GenericDataGenerator::builder
private

builder object from which we are generating data

◆ joins

std::vector<DataGeneraterJoin> GenericQuery::GenericDataGenerator::joins
private

List of joins.

◆ nextRecord

DataRecord GenericQuery::GenericDataGenerator::nextRecord
private

◆ recordValidator

RecordValidator GenericQuery::GenericDataGenerator::recordValidator
private

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