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

Function ExpandArrays

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

Expand all arrays in the queue and replace the contents of queue with them.

Source from the content-addressed store, hash-verified

185
186// Expand all arrays in the queue and replace the contents of queue with them.
187static void ExpandArrays(JsonUdfValue* queue, JsonUdfAllocator* allocator) {
188 DCHECK(queue->IsArray());
189 SizeType old_items = queue->Size();
190 for (SizeType i = 0; i < old_items; ++i) {
191 if (!(*queue)[i].IsArray()) continue;
192 for (auto& v : (*queue)[i].GetArray()) queue->PushBack(v, *allocator);
193 }
194 queue->Erase(queue->Begin(), queue->Begin() + old_items);
195}
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) {

Callers 1

ProcessWildcardIndexFunction · 0.85

Calls 4

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

Tested by

no test coverage detected