ClickHouse/src/Interpreters/InterpreterShowEngineQuery.cpp
Robert Schulze 6f8a450805
Sort output of SHOW <INFO> statements
Sorting is strictly speaking not necessary, but
1. sorted output is more user-friendly,
2. SQL currently does not allow to sort the output of SHOW <INFO>
   otherwise, e.g. SELECT * FROM (SHOW <INFO> ...) ORDER BY is rejected.
3. SQL tests can take advantage of that.
2023-03-28 20:55:59 +00:00

19 lines
374 B
C++

#include <IO/ReadBufferFromString.h>
#include <Interpreters/Context.h>
#include <Interpreters/executeQuery.h>
#include <Interpreters/InterpreterShowEngineQuery.h>
#include <Parsers/ASTQueryWithOutput.h>
namespace DB
{
BlockIO InterpreterShowEnginesQuery::execute()
{
return executeQuery("SELECT * FROM system.table_engines ORDER BY name", getContext(), true);
}
}