OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 145 of file UpdelStorage.cpp.

Constructor & Destructor Documentation

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

Definition at line 153 of file UpdelStorage.cpp.

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

154  : chunk_(chunk), column_descriptor_(chunk->getColumnDesc()) {
155  column_data_ = std::make_unique<std::vector<ArrayDatum>>(num_rows);
158  }
HOST DEVICE int get_size() const
Definition: sqltypes.h:403
virtual int8_t * getMemoryPtr()=0
const ColumnDescriptor * getColumnDesc() const
Definition: Chunk.h:65
std::unique_ptr< std::vector< ArrayDatum > > column_data_
AbstractBuffer * getBuffer() const
Definition: Chunk.h:146
SQLTypeInfo columnType

+ Here is the call graph for this function:

Fragmenter_Namespace::FixedLenArrayChunkConverter::~FixedLenArrayChunkConverter ( )
inlineoverride

Definition at line 160 of file UpdelStorage.cpp.

160 {}

Member Function Documentation

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

Implements Fragmenter_Namespace::ChunkToInsertDataConverter.

Definition at line 172 of file UpdelStorage.cpp.

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

172  {
173  DataBlockPtr dataBlock;
174  dataBlock.arraysPtr = column_data_.get();
175  insertData.data.push_back(dataBlock);
176  insertData.columnIds.push_back(column_descriptor_->columnId);
177  }
std::vector< ArrayDatum > * arraysPtr
Definition: sqltypes.h:235
std::unique_ptr< std::vector< ArrayDatum > > column_data_
std::vector< DataBlockPtr > data
the number of rows being inserted
Definition: Fragmenter.h:73
std::vector< int > columnIds
identifies the table into which the data is being inserted
Definition: Fragmenter.h:71
void Fragmenter_Namespace::FixedLenArrayChunkConverter::convertToColumnarFormat ( size_t  row,
size_t  indexInFragment 
)
inlineoverridevirtual

Implements Fragmenter_Namespace::ChunkToInsertDataConverter.

Reimplemented in Fragmenter_Namespace::ArrayChunkConverter.

Definition at line 162 of file UpdelStorage.cpp.

References column_descriptor_, ColumnDescriptor::columnType, data_buffer_addr_, fixed_array_length_, FixedLengthArrayNoneEncoder::is_null(), and is_null().

162  {
163  auto src_value_ptr = data_buffer_addr_ + (indexInFragment * fixed_array_length_);
164 
166  src_value_ptr);
167 
168  (*column_data_)[row] = ArrayDatum(
169  fixed_array_length_, (int8_t*)src_value_ptr, is_null, DoNothingDeleter());
170  }
std::conditional_t< is_cuda_compiler(), DeviceArrayDatum, HostArrayDatum > ArrayDatum
Definition: sqltypes.h:229
CONSTEXPR DEVICE bool is_null(const T &value)
static bool is_null(const SQLTypeInfo &type, int8_t *array)
SQLTypeInfo columnType

+ Here is the call graph for this function:

Member Data Documentation

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

Definition at line 146 of file UpdelStorage.cpp.

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

Definition at line 149 of file UpdelStorage.cpp.

Referenced by addDataBlocksToInsertData(), and FixedLenArrayChunkConverter().

const ColumnDescriptor* Fragmenter_Namespace::FixedLenArrayChunkConverter::column_descriptor_

Definition at line 147 of file UpdelStorage.cpp.

Referenced by addDataBlocksToInsertData(), and convertToColumnarFormat().

int8_t* Fragmenter_Namespace::FixedLenArrayChunkConverter::data_buffer_addr_
size_t Fragmenter_Namespace::FixedLenArrayChunkConverter::fixed_array_length_

Definition at line 151 of file UpdelStorage.cpp.

Referenced by convertToColumnarFormat(), and FixedLenArrayChunkConverter().


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