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

Function handleParseFromStringError

c++/src/ConvertColumnReader.cc:78–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76 }
77
78 static inline void handleParseFromStringError(ColumnVectorBatch& dstBatch, uint64_t idx,
79 bool shouldThrow, const std::string& typeName,
80 const std::string& str,
81 const std::string& expectedFormat = "") {
82 if (!shouldThrow) {
83 dstBatch.notNull.data()[idx] = 0;
84 dstBatch.hasNulls = true;
85 } else {
86 std::ostringstream ss;
87 ss << "Failed to parse " << typeName << " from string:" << str;
88 if (expectedFormat != "") {
89 ss << " the following format \"" << expectedFormat << "\" is expected";
90 }
91 throw SchemaEvolutionError(ss.str());
92 }
93 }
94
95 // return false if overflow
96 template <typename ReadType>

Callers 4

convertToIntegerMethod · 0.85
convertToDoubleMethod · 0.85
convertToTimestampMethod · 0.85
convertToDecimalMethod · 0.85

Calls 2

dataMethod · 0.45

Tested by

no test coverage detected