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

Method ExtractInt32

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

Source from the content-addressed store, hash-verified

87}
88
89Status JsonReader::ExtractInt32(const Value* object,
90 const char* field,
91 int32_t* result) const {
92 const Value* val;
93 RETURN_NOT_OK(ExtractField(object, field, &val));
94 if (PREDICT_FALSE(!val->IsInt())) {
95 return Status::InvalidArgument(Substitute(
96 "wrong type during field extraction: expected int32 but got $0",
97 TypeToString(val->GetType())));
98 }
99 *result = val->GetInt();
100 return Status::OK();
101}
102
103Status JsonReader::ExtractUint32(const Value* object,
104 const char* field,

Callers 1

TESTFunction · 0.80

Calls 5

InvalidArgumentFunction · 0.85
SubstituteFunction · 0.85
OKFunction · 0.85
TypeToStringFunction · 0.70
GetIntMethod · 0.45

Tested by 1

TESTFunction · 0.64