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

Method ExtractBool

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

Source from the content-addressed store, hash-verified

73}
74
75Status JsonReader::ExtractBool(const Value* object,
76 const char* field,
77 bool* result) const {
78 const Value* val;
79 RETURN_NOT_OK(ExtractField(object, field, &val));
80 if (PREDICT_FALSE(!val->IsBool())) {
81 return Status::InvalidArgument(Substitute(
82 "wrong type during field extraction: expected bool but got $0",
83 TypeToString(val->GetType())));
84 }
85 *result = val->GetBool();
86 return Status::OK();
87}
88
89Status JsonReader::ExtractInt32(const Value* object,
90 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