| 32 | } |
| 33 | |
| 34 | BlockInputStreamPtr BlockIO::getInputStream() |
| 35 | { |
| 36 | if (out) |
| 37 | throw Exception("Cannot get input stream from BlockIO because output stream is not empty", |
| 38 | ErrorCodes::LOGICAL_ERROR); |
| 39 | |
| 40 | if (in) |
| 41 | return in; |
| 42 | |
| 43 | if (pipeline.initialized()) |
| 44 | return std::make_shared<PipelineExecutingBlockInputStream>(std::move(pipeline)); |
| 45 | |
| 46 | throw Exception("Cannot get input stream from BlockIO because query pipeline was not initialized", |
| 47 | ErrorCodes::LOGICAL_ERROR); |
| 48 | } |
| 49 | |
| 50 | void BlockIO::reset() |
| 51 | { |
no test coverage detected