| 333 | } |
| 334 | |
| 335 | Block InterpreterKillQueryQuery::getSelectResult(const String & columns, const String & table) |
| 336 | { |
| 337 | String select_query = "SELECT " + columns + " FROM " + table; |
| 338 | auto & where_expression = query_ptr->as<ASTKillQueryQuery>()->where_expression; |
| 339 | if (where_expression) |
| 340 | select_query += " WHERE " + queryToString(where_expression); |
| 341 | |
| 342 | auto block_io = executeQuery(select_query, getContext(), true); |
| 343 | auto stream = block_io.getInputStream(); |
| 344 | Block res = stream->read(); |
| 345 | |
| 346 | if (res && stream->read()) |
| 347 | throw Exception("Expected one block from input stream", ErrorCodes::LOGICAL_ERROR); |
| 348 | |
| 349 | return res; |
| 350 | } |
| 351 | |
| 352 | |
| 353 | AccessRightsElements InterpreterKillQueryQuery::getRequiredAccessForDDLOnCluster() const |
nothing calls this directly
no test coverage detected