MCPcopy Create free account
hub / github.com/apache/orc / convertToStrBuffer

Method convertToStrBuffer

c++/src/ConvertColumnReader.cc:272–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270 };
271
272 uint64_t BooleanToStringVariantColumnReader::convertToStrBuffer(ColumnVectorBatch& rowBatch,
273 uint64_t numValues) {
274 uint64_t size = 0;
275 strBuffer.resize(numValues);
276 const auto& srcBatch = *SafeCastBatchTo<const BooleanVectorBatch*>(data.get());
277 // cast the bool value to string
278 for (uint64_t i = 0; i < numValues; ++i) {
279 if (!rowBatch.hasNulls || rowBatch.notNull[i]) {
280 strBuffer[i] = (srcBatch.data[i] ? trueValue_ : falseValue_);
281 size += strBuffer[i].size();
282 }
283 }
284 return size;
285 }
286
287 template <typename FileTypeBatch>
288 class NumericToStringVariantColumnReader : public ConvertToStringVariantColumnReader {

Callers

nothing calls this directly

Calls 8

getMaximumLengthMethod · 0.80
to_stringFunction · 0.70
sizeMethod · 0.65
getKindMethod · 0.65
resizeMethod · 0.45
getMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected