MCPcopy Index your code
hub / github.com/apache/orc / fillLongValues

Function fillLongValues

tools/src/CSVFileImport.cc:56–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56void fillLongValues(const std::vector<std::string>& data, orc::ColumnVectorBatch* batch,
57 uint64_t numValues, uint64_t colIndex) {
58 orc::LongVectorBatch* longBatch = dynamic_cast<orc::LongVectorBatch*>(batch);
59 bool hasNull = false;
60 for (uint64_t i = 0; i < numValues; ++i) {
61 std::string col = extractColumn(data[i], colIndex);
62 if (col.empty()) {
63 batch->notNull[i] = 0;
64 hasNull = true;
65 } else {
66 batch->notNull[i] = 1;
67 longBatch->data[i] = atoll(col.c_str());
68 }
69 }
70 longBatch->hasNulls = hasNull;
71 longBatch->numElements = numValues;
72}
73
74void fillStringValues(const std::vector<std::string>& data, orc::ColumnVectorBatch* batch,
75 uint64_t numValues, uint64_t colIndex, orc::DataBuffer<char>& buffer) {

Callers 1

mainFunction · 0.85

Calls 1

extractColumnFunction · 0.85

Tested by

no test coverage detected