MCPcopy Create free account
hub / github.com/apache/impala / ExtractDouble

Method ExtractDouble

be/src/kudu/util/jsonreader.cc:145–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145Status JsonReader::ExtractDouble(const Value* object,
146 const char* field,
147 double* result) const {
148 const Value* val;
149 RETURN_NOT_OK(ExtractField(object, field, &val));
150 if (PREDICT_FALSE(!val->IsLosslessDouble())) {
151 return Status::InvalidArgument(Substitute(
152 "wrong type during field extraction: expected a lossless double type but got $0",
153 TypeToString(val->GetType())));
154 }
155 *result = val->GetDouble();
156 return Status::OK();
157}
158
159Status JsonReader::ExtractFloat(const Value* object,
160 const char* field,

Callers 2

TESTFunction · 0.80
TEST_FFunction · 0.80

Calls 4

InvalidArgumentFunction · 0.85
SubstituteFunction · 0.85
OKFunction · 0.85
TypeToStringFunction · 0.70

Tested by 2

TESTFunction · 0.64
TEST_FFunction · 0.64