| 40 | } |
| 41 | |
| 42 | void TableHandler::parse(const Block & block) |
| 43 | { |
| 44 | LOG_INFO(&Poco::Logger::get("TableHandler"), "table={}", table_identifier.getDbTableName()); |
| 45 | if (block.columns() != column_size) |
| 46 | { |
| 47 | throw Exception("fetched block has wrong column size", ErrorCodes::LOGICAL_ERROR); |
| 48 | } |
| 49 | |
| 50 | size_t column_offset = 0; |
| 51 | for (auto & handler : handlers) |
| 52 | { |
| 53 | handler->parse(block, column_offset); |
| 54 | column_offset += handler->size(); |
| 55 | } |
| 56 | |
| 57 | if (column_offset != column_size) |
| 58 | { |
| 59 | throw Exception("block column not match", ErrorCodes::LOGICAL_ERROR); |
| 60 | } |
| 61 | } |
| 62 | } |
no test coverage detected