本文整理汇总了C++中TableTuple::maxDRSerializationSize方法的典型用法代码示例。如果您正苦于以下问题:C++ TableTuple::maxDRSerializationSize方法的具体用法?C++ TableTuple::maxDRSerializationSize怎么用?C++ TableTuple::maxDRSerializationSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TableTuple
的用法示例。
在下文中一共展示了TableTuple::maxDRSerializationSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: computeOffsets
size_t DRTupleStream::computeOffsets(DRRecordType &type,
const std::pair<const TableIndex*, uint32_t> &indexPair,
TableTuple &tuple,
size_t &rowHeaderSz,
size_t &rowMetadataSz,
const std::vector<int> *&interestingColumns) {
interestingColumns = NULL;
rowMetadataSz = sizeof(int32_t);
int columnCount;
switch (type) {
case DR_RECORD_DELETE:
case DR_RECORD_UPDATE:
if (indexPair.first) {
// The index-optimized versions of these types have values exactly
// 5 larger than the unoptimized versions (asserted in test)
// DR_RECORD_DELETE => DR_RECORD_DELETE_BY_INDEX
// DR_RECORD_UPDATE => DR_RECORD_UPDATE_BY_INDEX
type = static_cast<DRRecordType>((int)type + 5);
interestingColumns = &(indexPair.first->getColumnIndices());
rowMetadataSz += sizeof(int32_t);
columnCount = static_cast<int>(interestingColumns->size());
} else {
columnCount = tuple.sizeInValues();
}
break;
default:
columnCount = tuple.sizeInValues();
break;
}
int nullMaskLength = ((columnCount + 7) & -8) >> 3;
rowHeaderSz = rowMetadataSz + nullMaskLength;
return rowHeaderSz + tuple.maxDRSerializationSize(interestingColumns);
}
示例2: computeOffsets
size_t CompatibleDRTupleStream::computeOffsets(DRRecordType &type,
TableTuple &tuple,
size_t &rowHeaderSz,
size_t &rowMetadataSz) {
rowMetadataSz = sizeof(int32_t);
int columnCount;
switch (type) {
case DR_RECORD_DELETE:
case DR_RECORD_UPDATE:
columnCount = tuple.sizeInValues();
break;
default:
columnCount = tuple.sizeInValues();
break;
}
int nullMaskLength = ((columnCount + 7) & -8) >> 3;
rowHeaderSz = rowMetadataSz + nullMaskLength;
return rowHeaderSz + tuple.maxDRSerializationSize();
}