You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-4412 Introduce TypeHandler::getEmptyValueForType to return const ptr for an empty value
WE changes for SQL DML and DDL operations Changes for bulk operations Changes for scanning operations Cleanup
This commit is contained in:
@ -129,6 +129,10 @@ private:
|
||||
void makeScanMsg();
|
||||
void makeStepMsg();
|
||||
void setLBID(uint64_t rid);
|
||||
template<typename T>
|
||||
inline void fillEmptyBlock(uint8_t* dst,
|
||||
const uint8_t*emptyValue,
|
||||
const uint32_t number) const;
|
||||
|
||||
bool _isScan;
|
||||
|
||||
@ -171,6 +175,35 @@ private:
|
||||
friend class RTSCommand;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
inline void ColumnCommand::fillEmptyBlock(uint8_t* dst,
|
||||
const uint8_t*emptyValue,
|
||||
const uint32_t number) const
|
||||
{
|
||||
T* typedDst = reinterpret_cast<T*>(dst);
|
||||
const T* typedEmptyValue = reinterpret_cast<const T*>(emptyValue);
|
||||
for (uint32_t idx = 0; idx < number; idx = idx + 4)
|
||||
{
|
||||
typedDst[idx] = *typedEmptyValue;
|
||||
typedDst[idx+1] = *typedEmptyValue;
|
||||
typedDst[idx+2] = *typedEmptyValue;
|
||||
typedDst[idx+3] = *typedEmptyValue;
|
||||
}
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void ColumnCommand::fillEmptyBlock<messageqcpp::ByteStream::hexbyte>(uint8_t* dst,
|
||||
const uint8_t*emptyValue,
|
||||
const uint32_t number) const
|
||||
{
|
||||
for (uint32_t idx = 0; idx < number; idx++)
|
||||
{
|
||||
datatypes::TSInt128::assignPtrPtr(dst + idx * sizeof(messageqcpp::ByteStream::hexbyte),
|
||||
emptyValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user