OmniSciDB  c07336695a
Fragmenter_Namespace::DateChunkConverter< BUFFER_DATA_TYPE > Struct Template Reference
+ Inheritance diagram for Fragmenter_Namespace::DateChunkConverter< BUFFER_DATA_TYPE >:
+ Collaboration diagram for Fragmenter_Namespace::DateChunkConverter< BUFFER_DATA_TYPE >:

Public Types

using ColumnDataPtr = std::unique_ptr< int64_t, CheckedMallocDeleter< int64_t > >
 

Public Member Functions

 DateChunkConverter (const size_t num_rows, const Chunk_NS::Chunk *chunk)
 
 ~DateChunkConverter () override
 
void convertToColumnarFormat (size_t row, size_t indexInFragment) override
 
void addDataBlocksToInsertData (Fragmenter_Namespace::InsertData &insertData) override
 
- Public Member Functions inherited from Fragmenter_Namespace::ChunkToInsertDataConverter
virtual ~ChunkToInsertDataConverter ()
 

Public Attributes

const Chunk_NS::Chunkchunk_
 
ColumnDataPtr column_data_
 
const ColumnDescriptorcolumn_descriptor_
 
const BUFFER_DATA_TYPE * data_buffer_addr_
 

Detailed Description

template<typename BUFFER_DATA_TYPE>
struct Fragmenter_Namespace::DateChunkConverter< BUFFER_DATA_TYPE >

Definition at line 261 of file UpdelStorage.cpp.

Member Typedef Documentation

◆ ColumnDataPtr

template<typename BUFFER_DATA_TYPE >
using Fragmenter_Namespace::DateChunkConverter< BUFFER_DATA_TYPE >::ColumnDataPtr = std::unique_ptr<int64_t, CheckedMallocDeleter<int64_t> >

Definition at line 262 of file UpdelStorage.cpp.

Constructor & Destructor Documentation

◆ DateChunkConverter()

template<typename BUFFER_DATA_TYPE >
Fragmenter_Namespace::DateChunkConverter< BUFFER_DATA_TYPE >::DateChunkConverter ( const size_t  num_rows,
const Chunk_NS::Chunk chunk 
)
inline

Definition at line 269 of file UpdelStorage.cpp.

References checked_malloc(), Chunk_NS::Chunk::get_buffer(), and Data_Namespace::AbstractBuffer::getMemoryPtr().

270  : chunk_(chunk), column_descriptor_(chunk->get_column_desc()) {
272  reinterpret_cast<int64_t*>(checked_malloc(num_rows * sizeof(int64_t))));
273  data_buffer_addr_ = (BUFFER_DATA_TYPE*)chunk->get_buffer()->getMemoryPtr();
274  }
const BUFFER_DATA_TYPE * data_buffer_addr_
const int8_t const int64_t * num_rows
const ColumnDescriptor * get_column_desc() const
Definition: Chunk.h:52
virtual int8_t * getMemoryPtr()=0
AbstractBuffer * get_buffer() const
Definition: Chunk.h:94
const ColumnDescriptor * column_descriptor_
void * checked_malloc(const size_t size)
Definition: checked_alloc.h:40
std::unique_ptr< int64_t, CheckedMallocDeleter< int64_t > > ColumnDataPtr
+ Here is the call graph for this function:

◆ ~DateChunkConverter()

template<typename BUFFER_DATA_TYPE >
Fragmenter_Namespace::DateChunkConverter< BUFFER_DATA_TYPE >::~DateChunkConverter ( )
inlineoverride

Definition at line 276 of file UpdelStorage.cpp.

276 {}

Member Function Documentation

◆ addDataBlocksToInsertData()

template<typename BUFFER_DATA_TYPE >
void Fragmenter_Namespace::DateChunkConverter< BUFFER_DATA_TYPE >::addDataBlocksToInsertData ( Fragmenter_Namespace::InsertData insertData)
inlineoverridevirtual

Implements Fragmenter_Namespace::ChunkToInsertDataConverter.

Definition at line 284 of file UpdelStorage.cpp.

References ColumnDescriptor::columnId, Fragmenter_Namespace::InsertData::columnIds, Fragmenter_Namespace::InsertData::data, and DataBlockPtr::numbersPtr.

284  {
285  DataBlockPtr dataBlock;
286  dataBlock.numbersPtr = reinterpret_cast<int8_t*>(column_data_.get());
287  insertData.data.push_back(dataBlock);
288  insertData.columnIds.push_back(column_descriptor_->columnId);
289  }
const ColumnDescriptor * column_descriptor_
std::vector< DataBlockPtr > data
the number of rows being inserted
Definition: Fragmenter.h:64
int8_t * numbersPtr
Definition: sqltypes.h:137
std::vector< int > columnIds
identifies the table into which the data is being inserted
Definition: Fragmenter.h:62

◆ convertToColumnarFormat()

template<typename BUFFER_DATA_TYPE >
void Fragmenter_Namespace::DateChunkConverter< BUFFER_DATA_TYPE >::convertToColumnarFormat ( size_t  row,
size_t  indexInFragment 
)
inlineoverridevirtual

Implements Fragmenter_Namespace::ChunkToInsertDataConverter.

Definition at line 278 of file UpdelStorage.cpp.

References DateConverters::get_epoch_seconds_from_days().

278  {
279  auto buffer_value = data_buffer_addr_[indexInFragment];
280  auto insert_value = static_cast<int64_t>(buffer_value);
282  }
const BUFFER_DATA_TYPE * data_buffer_addr_
int64_t get_epoch_seconds_from_days(const int64_t days)
+ Here is the call graph for this function:

Member Data Documentation

◆ chunk_

template<typename BUFFER_DATA_TYPE >
const Chunk_NS::Chunk* Fragmenter_Namespace::DateChunkConverter< BUFFER_DATA_TYPE >::chunk_

Definition at line 264 of file UpdelStorage.cpp.

◆ column_data_

template<typename BUFFER_DATA_TYPE >
ColumnDataPtr Fragmenter_Namespace::DateChunkConverter< BUFFER_DATA_TYPE >::column_data_

Definition at line 265 of file UpdelStorage.cpp.

◆ column_descriptor_

template<typename BUFFER_DATA_TYPE >
const ColumnDescriptor* Fragmenter_Namespace::DateChunkConverter< BUFFER_DATA_TYPE >::column_descriptor_

Definition at line 266 of file UpdelStorage.cpp.

◆ data_buffer_addr_

template<typename BUFFER_DATA_TYPE >
const BUFFER_DATA_TYPE* Fragmenter_Namespace::DateChunkConverter< BUFFER_DATA_TYPE >::data_buffer_addr_

Definition at line 267 of file UpdelStorage.cpp.


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