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

Method ExtractObjectArray

src/kudu/util/jsonreader.cc:205–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205Status JsonReader::ExtractObjectArray(const Value* object,
206 const char* field,
207 vector<const Value*>* result) const {
208 const Value* val;
209 RETURN_NOT_OK(ExtractField(object, field, &val));
210 if (PREDICT_FALSE(!val->IsArray())) {
211 return Status::InvalidArgument(Substitute(
212 "wrong type during field extraction: expected object array but got $0",
213 TypeToString(val->GetType())));
214 }
215 for (Value::ConstValueIterator iter = val->Begin(); iter != val->End(); ++iter) {
216 result->push_back(iter);
217 }
218 return Status::OK();
219}
220
221Status JsonReader::ExtractField(const Value* object,
222 const char* field,

Callers 11

GetInt64MetricFunction · 0.80
LocateRowFunction · 0.80
ConvertToKuduPartialRowFunction · 0.80
ParseValueOfTypeFunction · 0.80
NewInListPredicateFunction · 0.80
AddPredicatesFunction · 0.80
ListTabletRowsetIdsMethod · 0.80
TESTFunction · 0.80
TEST_FFunction · 0.80
CheckMergeOutputFunction · 0.80

Calls 8

InvalidArgumentFunction · 0.85
SubstituteFunction · 0.85
OKFunction · 0.85
GetTypeMethod · 0.80
EndMethod · 0.80
push_backMethod · 0.80
TypeToStringFunction · 0.70
BeginMethod · 0.45

Tested by 5

GetInt64MetricFunction · 0.64
ListTabletRowsetIdsMethod · 0.64
TESTFunction · 0.64
TEST_FFunction · 0.64
CheckMergeOutputFunction · 0.64