1
0
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:
Roman Nozdrin
2021-01-15 16:02:10 +00:00
parent 16b52860e8
commit 5fce19df0a
27 changed files with 741 additions and 580 deletions

View File

@ -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