MCPcopy Create free account
hub / github.com/apache/fory / get_struct

Method get_struct

cpp/fory/row/row.cc:65–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65std::shared_ptr<Row> Getter::get_struct(int i,
66 StructTypePtr struct_type) const {
67 if (is_null_at(i))
68 return nullptr;
69 auto offset_and_size = get_uint64(i);
70 auto relative_offset = static_cast<uint32_t>(offset_and_size >> 32);
71 auto size = static_cast<uint32_t>(offset_and_size);
72 auto row_schema = schema(struct_type->fields());
73 std::shared_ptr<Row> row = std::make_shared<Row>(row_schema);
74 row->point_to(buffer(), base_offset() + relative_offset, size);
75 return row;
76}
77
78std::shared_ptr<ArrayData> Getter::get_array(int i,
79 ListTypePtr array_type) const {

Callers 3

TESTFunction · 0.45
TESTFunction · 0.45
mainFunction · 0.45

Calls 3

schemaFunction · 0.85
point_toMethod · 0.80
fieldsMethod · 0.45

Tested by 2

TESTFunction · 0.36
TESTFunction · 0.36