MCPcopy Create free account
hub / github.com/ByConity/ByConity / getSelectResult

Method getSelectResult

src/Interpreters/InterpreterKillQueryQuery.cpp:335–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335Block 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
353AccessRightsElements InterpreterKillQueryQuery::getRequiredAccessForDDLOnCluster() const

Callers

nothing calls this directly

Calls 5

queryToStringFunction · 0.85
getInputStreamMethod · 0.80
executeQueryFunction · 0.70
ExceptionClass · 0.70
readMethod · 0.45

Tested by

no test coverage detected