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

Method InitNullCollectionValues

be/src/exec/hdfs-scan-node-base.cc:986–1004  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

984}
985
986void HdfsScanNodeBase::InitNullCollectionValues(const TupleDescriptor* tuple_desc,
987 Tuple* tuple) const {
988 for (const SlotDescriptor* slot_desc: tuple_desc->collection_slots()) {
989 CollectionValue* slot = reinterpret_cast<CollectionValue*>(
990 tuple->GetSlot(slot_desc->tuple_offset()));
991 if (tuple->IsNull(slot_desc->null_indicator_offset())) {
992 *slot = CollectionValue();
993 continue;
994 }
995 // Recursively traverse collection items.
996 const TupleDescriptor* item_desc = slot_desc->children_tuple_descriptor();
997 if (item_desc->collection_slots().empty()) continue;
998 for (int i = 0; i < slot->num_tuples; ++i) {
999 int item_offset = i * item_desc->byte_size();
1000 Tuple* collection_item = reinterpret_cast<Tuple*>(slot->ptr + item_offset);
1001 InitNullCollectionValues(item_desc, collection_item);
1002 }
1003 }
1004}
1005
1006void HdfsScanNodeBase::InitNullCollectionValues(RowBatch* row_batch) const {
1007 DCHECK_EQ(row_batch->row_desc()->tuple_descriptors().size(), 1);

Callers

nothing calls this directly

Calls 12

tuple_offsetMethod · 0.80
CollectionValueClass · 0.50
GetSlotMethod · 0.45
IsNullMethod · 0.45
emptyMethod · 0.45
byte_sizeMethod · 0.45
sizeMethod · 0.45
row_descMethod · 0.45
num_rowsMethod · 0.45
GetTupleMethod · 0.45
GetRowMethod · 0.45

Tested by

no test coverage detected