| 287 | using Port::Port; |
| 288 | |
| 289 | Data ALWAYS_INLINE pullData(bool set_not_needed = false) |
| 290 | { |
| 291 | if (!set_not_needed) |
| 292 | updateVersion(); |
| 293 | |
| 294 | assumeConnected(); |
| 295 | |
| 296 | std::uintptr_t flags = 0; |
| 297 | state->pull(data, flags, set_not_needed); |
| 298 | |
| 299 | is_finished = flags & State::IS_FINISHED; |
| 300 | |
| 301 | if (unlikely(!data->exception && data->chunk.getNumColumns() != header->columns())) |
| 302 | { |
| 303 | auto & chunk = data->chunk; |
| 304 | |
| 305 | throw Exception( |
| 306 | ErrorCodes::LOGICAL_ERROR, |
| 307 | "Invalid number of columns in chunk pulled from OutputPort. Expected {}, found {}\n" |
| 308 | "Header: {}\n" |
| 309 | "Chunk: {}\n", |
| 310 | header->columns(), |
| 311 | chunk.getNumColumns(), |
| 312 | header->dumpStructure(), |
| 313 | chunk.dumpStructure()); |
| 314 | } |
| 315 | |
| 316 | rows += data->chunk.getNumRows(); |
| 317 | bytes += data->chunk.bytes(); |
| 318 | |
| 319 | return std::move(*data); |
| 320 | } |
| 321 | |
| 322 | Chunk ALWAYS_INLINE pull(bool set_not_needed = false) |
| 323 | { |
no test coverage detected