| 789 | }; |
| 790 | |
| 791 | Status StructReader::GetDefLevels(const int16_t** data, int64_t* length) { |
| 792 | *data = nullptr; |
| 793 | if (children_.size() == 0) { |
| 794 | *length = 0; |
| 795 | return Status::Invalid("StructReader had no children"); |
| 796 | } |
| 797 | |
| 798 | // This method should only be called when this struct or one of its parents |
| 799 | // are optional/repeated or it has a repeated child. |
| 800 | // Meaning all children must have rep/def levels associated |
| 801 | // with them. |
| 802 | RETURN_NOT_OK(def_rep_level_child_->GetDefLevels(data, length)); |
| 803 | return Status::OK(); |
| 804 | } |
| 805 | |
| 806 | Status StructReader::GetRepLevels(const int16_t** data, int64_t* length) { |
| 807 | *data = nullptr; |
no test coverage detected