OmniSciDB  f632821e96
Fragmenter_Namespace::FixedLenArrayChunkConverter Struct Reference
+ Inheritance diagram for Fragmenter_Namespace::FixedLenArrayChunkConverter:
+ Collaboration diagram for Fragmenter_Namespace::FixedLenArrayChunkConverter:

Public Member Functions

 FixedLenArrayChunkConverter (const size_t num_rows, const Chunk_NS::Chunk *chunk)
 
 ~FixedLenArrayChunkConverter () 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_
 
const ColumnDescriptorcolumn_descriptor_
 
std::unique_ptr< std::vector< ArrayDatum > > column_data_
 
int8_t * data_buffer_addr_
 
size_t fixed_array_length_
 

Detailed Description

Definition at line 144 of file UpdelStorage.cpp.

Constructor & Destructor Documentation

◆ FixedLenArrayChunkConverter()

Fragmenter_Namespace::FixedLenArrayChunkConverter::FixedLenArrayChunkConverter ( const size_t  num_rows,
const Chunk_NS::Chunk chunk 
)
inline

Definition at line 152 of file UpdelStorage.cpp.

References ColumnDescriptor::columnType, SQLTypeInfo::get_size(), Chunk_NS::Chunk::getBuffer(), Chunk_NS::Chunk::getColumnDesc(), Data_Namespace::AbstractBuffer::getMemoryPtr(), and num_rows.

153  : chunk_(chunk), column_descriptor_(chunk->getColumnDesc()) {
154  column_data_ = std::make_unique<std::vector<ArrayDatum>>(num_rows);
157  }
const int8_t const int64_t * num_rows
AbstractBuffer * getBuffer() const
Definition: Chunk.h:104
virtual int8_t * getMemoryPtr()=0
HOST DEVICE int get_size() const
Definition: sqltypes.h:269
std::unique_ptr< std::vector< ArrayDatum > > column_data_
const ColumnDescriptor * getColumnDesc() const
Definition: Chunk.h:53
SQLTypeInfo columnType
+ Here is the call graph for this function:

◆ ~FixedLenArrayChunkConverter()

Fragmenter_Namespace::FixedLenArrayChunkConverter::~FixedLenArrayChunkConverter ( )
inlineoverride

Definition at line 159 of file UpdelStorage.cpp.

159 {}

Member Function Documentation

◆ addDataBlocksToInsertData()

void Fragmenter_Namespace::FixedLenArrayChunkConverter::addDataBlocksToInsertData ( Fragmenter_Namespace::InsertData insertData)
inlineoverridevirtual

Implements Fragmenter_Namespace::ChunkToInsertDataConverter.

Definition at line 171 of file UpdelStorage.cpp.

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

171  {
172  DataBlockPtr dataBlock;
173  dataBlock.arraysPtr = column_data_.get();
174  insertData.data.push_back(dataBlock);
175  insertData.columnIds.push_back(column_descriptor_->columnId);
176  }
std::vector< ArrayDatum > * arraysPtr
Definition: sqltypes.h:151
std::unique_ptr< std::vector< ArrayDatum > > column_data_
std::vector< DataBlockPtr > data
the number of rows being inserted
Definition: Fragmenter.h:64
std::vector< int > columnIds
identifies the table into which the data is being inserted
Definition: Fragmenter.h:62

◆ convertToColumnarFormat()

void Fragmenter_Namespace::FixedLenArrayChunkConverter::convertToColumnarFormat ( size_t  row,
size_t  indexInFragment 
)
inlineoverridevirtual

Implements Fragmenter_Namespace::ChunkToInsertDataConverter.

Reimplemented in Fragmenter_Namespace::ArrayChunkConverter.

Definition at line 161 of file UpdelStorage.cpp.

References ColumnDescriptor::columnType, anonymous_namespace{TypedDataAccessors.h}::is_null(), and FixedLengthArrayNoneEncoder::is_null().

161  {
162  auto src_value_ptr = data_buffer_addr_ + (indexInFragment * fixed_array_length_);
163 
165  src_value_ptr);
166 
167  (*column_data_)[row] = ArrayDatum(
168  fixed_array_length_, (int8_t*)src_value_ptr, is_null, DoNothingDeleter());
169  }
std::conditional_t< is_cuda_compiler(), DeviceArrayDatum, HostArrayDatum > ArrayDatum
Definition: sqltypes.h:131
bool is_null(const T &v, const SQLTypeInfo &t)
static bool is_null(const SQLTypeInfo &type, int8_t *array)
SQLTypeInfo columnType
+ Here is the call graph for this function:

Member Data Documentation

◆ chunk_

const Chunk_NS::Chunk* Fragmenter_Namespace::FixedLenArrayChunkConverter::chunk_

Definition at line 145 of file UpdelStorage.cpp.

◆ column_data_

std::unique_ptr<std::vector<ArrayDatum> > Fragmenter_Namespace::FixedLenArrayChunkConverter::column_data_

Definition at line 148 of file UpdelStorage.cpp.

◆ column_descriptor_

const ColumnDescriptor* Fragmenter_Namespace::FixedLenArrayChunkConverter::column_descriptor_

Definition at line 146 of file UpdelStorage.cpp.

◆ data_buffer_addr_

int8_t* Fragmenter_Namespace::FixedLenArrayChunkConverter::data_buffer_addr_

Definition at line 149 of file UpdelStorage.cpp.

◆ fixed_array_length_

size_t Fragmenter_Namespace::FixedLenArrayChunkConverter::fixed_array_length_

Definition at line 150 of file UpdelStorage.cpp.


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