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

Method ExtractFloat

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

Source from the content-addressed store, hash-verified

157}
158
159Status JsonReader::ExtractFloat(const Value* object,
160 const char* field,
161 float* result) const {
162 const Value* val;
163 RETURN_NOT_OK(ExtractField(object, field, &val));
164 if (PREDICT_FALSE(!IsLosslessFloatValue(val))) {
165 return Status::InvalidArgument(Substitute(
166 "wrong type during field extraction: expected a lossless float type but got $0",
167 TypeToString(val->GetType())));
168 }
169 *result = val->GetFloat();
170 return Status::OK();
171}
172
173Status JsonReader::ExtractString(const Value* object,
174 const char* field,

Callers 1

TESTFunction · 0.80

Calls 4

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

Tested by 1

TESTFunction · 0.64