| 133 | |
| 134 | protected: |
| 135 | std::string printNonNull(vector_size_t index, const std::string& indent) |
| 136 | const override { |
| 137 | std::stringstream out; |
| 138 | |
| 139 | auto arrayVector = decoded_.base()->as<ArrayVector>(); |
| 140 | auto arrayIndex = decoded_.index(index); |
| 141 | |
| 142 | const auto& elements = children_[0]; |
| 143 | |
| 144 | auto offset = arrayVector->offsetAt(arrayIndex); |
| 145 | auto size = arrayVector->sizeAt(arrayIndex); |
| 146 | |
| 147 | auto newIndent = addIndent(indent); |
| 148 | bool fixedWidthElement = arrayVector->type()->childAt(0)->isFixedWidth(); |
| 149 | |
| 150 | for (auto i = 0; i < size; ++i) { |
| 151 | if (fixedWidthElement) { |
| 152 | out << indent << "Element " << i << ": " |
| 153 | << printFixedWidth(elements->decoded(), offset + i) << std::endl; |
| 154 | } else { |
| 155 | out << indent << "Element " << i << ": " |
| 156 | << elements->summarize(offset + i) << std::endl; |
| 157 | out << elements->print(offset + i, newIndent); |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | return out.str(); |
| 162 | } |
| 163 | |
| 164 | std::string summarizeNonNull(vector_size_t index) const override { |
| 165 | auto* base = decoded_.base(); |
nothing calls this directly
no test coverage detected