MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / getLoadSuggestionQuery

Function getLoadSuggestionQuery

src/Client/Suggest.cpp:132–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132static String getLoadSuggestionQuery(IServerConnection & connection, Int32 suggestion_limit, bool basic_suggestion, const ConnectionTimeouts & timeouts)
133{
134
135 String server_name;
136 UInt64 server_major_version = 0;
137 UInt64 server_minor_version = 0;
138 UInt64 server_patch_version = 0;
139 UInt64 server_revision = 0;
140 connection.getServerVersion(timeouts, server_name, server_major_version, server_minor_version, server_patch_version, server_revision);
141 if (server_major_version > CLICKHOUSE_SERVER_MIN_MAJOR_VERSION_WITH_SYSTEM_COMPLETIONS || (server_major_version == CLICKHOUSE_SERVER_MIN_MAJOR_VERSION_WITH_SYSTEM_COMPLETIONS && server_minor_version >= CLICKHOUSE_SERVER_MIN_MINOR_VERSION_WITH_SYSTEM_COMPLETIONS))
142 return getLoadSuggestionQueryUsingSystemCompletionsTable(suggestion_limit, basic_suggestion, server_revision);
143
144 return getLoadSuggestionQueryUsingSystemTables(suggestion_limit, basic_suggestion, server_revision);
145}
146
147template <typename ConnectionType>
148void Suggest::load(ContextPtr context, const ConnectionParameters & connection_parameters, Int32 suggestion_limit, bool wait_for_load)

Callers 1

loadMethod · 0.85

Tested by

no test coverage detected