| 144 | |
| 145 | template <> |
| 146 | void TopicChunkBuilder::set<std::string_view>(std::size_t col_index, std::string_view value) { |
| 147 | PJ_ASSERT(row_in_progress_, "set<string_view> called without begin_row"); |
| 148 | PJ_ASSERT(col_index < columns_.size(), "col_index out of bounds"); |
| 149 | columns_[col_index].appendString(value); |
| 150 | auto& cs = stats_.column_stats[col_index]; |
| 151 | const std::size_t current_row = columns_[col_index].rowCount() - 1; |
| 152 | if (current_row == 0) { |
| 153 | cs.run_count = 1; |
| 154 | } else { |
| 155 | std::string_view prev = columns_[col_index].readString(current_row - 1); |
| 156 | if (value != prev) { |
| 157 | cs.is_constant = false; |
| 158 | cs.run_count++; |
| 159 | } |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | void TopicChunkBuilder::setNull(std::size_t col_index) { |
| 164 | PJ_ASSERT(row_in_progress_, "set_null called without begin_row"); |
nothing calls this directly
no test coverage detected