| 63 | } |
| 64 | |
| 65 | std::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 | |
| 78 | std::shared_ptr<ArrayData> Getter::get_array(int i, |
| 79 | ListTypePtr array_type) const { |