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

Function fillDoubleValues

tools/src/CSVFileImport.cc:109–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109void fillDoubleValues(const std::vector<std::string>& data, orc::ColumnVectorBatch* batch,
110 uint64_t numValues, uint64_t colIndex) {
111 orc::DoubleVectorBatch* dblBatch = dynamic_cast<orc::DoubleVectorBatch*>(batch);
112 bool hasNull = false;
113 for (uint64_t i = 0; i < numValues; ++i) {
114 std::string col = extractColumn(data[i], colIndex);
115 if (col.empty()) {
116 batch->notNull[i] = 0;
117 hasNull = true;
118 } else {
119 batch->notNull[i] = 1;
120 dblBatch->data[i] = atof(col.c_str());
121 }
122 }
123 dblBatch->hasNulls = hasNull;
124 dblBatch->numElements = numValues;
125}
126
127// parse fixed point decimal numbers
128void fillDecimalValues(const std::vector<std::string>& data, orc::ColumnVectorBatch* batch,

Callers 1

mainFunction · 0.85

Calls 1

extractColumnFunction · 0.85

Tested by

no test coverage detected