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

Function ExtractValues

be/src/exprs/string-functions.cc:198–205  ·  view source on GitHub ↗

Extract all values of the objects in queue and replace the contents of queue with them

Source from the content-addressed store, hash-verified

196
197// Extract all values of the objects in queue and replace the contents of queue with them
198static void ExtractValues(JsonUdfValue* queue, JsonUdfAllocator* allocator) {
199 SizeType old_items = queue->Size();
200 for (SizeType i = 0; i < old_items; ++i) {
201 if (!(*queue)[i].IsObject()) continue;
202 for (auto& m : (*queue)[i].GetObject()) queue->PushBack(m.value, *allocator);
203 }
204 queue->Erase(queue->Begin(), queue->Begin() + old_items);
205}
206
207/// Process wildcard(*) in value selection. path_idx is the index after the wildcard in
208/// path_str. Return next unprocessed index in path_str. Return -1 for errors.

Callers 1

ProcessWildcardKeyFunction · 0.70

Calls 5

GetObjectMethod · 0.80
PushBackMethod · 0.80
SizeMethod · 0.45
EraseMethod · 0.45
BeginMethod · 0.45

Tested by

no test coverage detected