| 804 | } |
| 805 | |
| 806 | Status StructReader::GetRepLevels(const int16_t** data, int64_t* length) { |
| 807 | *data = nullptr; |
| 808 | if (children_.size() == 0) { |
| 809 | *length = 0; |
| 810 | return Status::Invalid("StructReader had no children"); |
| 811 | } |
| 812 | |
| 813 | // This method should only be called when this struct or one of its parents |
| 814 | // are optional/repeated or it has repeated child. |
| 815 | // Meaning all children must have rep/def levels associated |
| 816 | // with them. |
| 817 | RETURN_NOT_OK(def_rep_level_child_->GetRepLevels(data, length)); |
| 818 | return Status::OK(); |
| 819 | } |
| 820 | |
| 821 | Status StructReader::BuildArray(int64_t length_upper_bound, |
| 822 | std::shared_ptr<ChunkedArray>* out) { |
no test coverage detected