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

Method ExtractBool

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 3

LocateRowFunction · 0.80
ParseValueOfTypeFunction · 0.80
TESTFunction · 0.80

Calls 6

InvalidArgumentFunction · 0.85
SubstituteFunction · 0.85
OKFunction · 0.85
GetTypeMethod · 0.80
TypeToStringFunction · 0.70
GetBoolMethod · 0.45

Tested by 1

TESTFunction · 0.64