ClickHouse/src/Storages/transformQueryForExternalDatabase.h
Ivan 495c6e03aa
Replace all Context references with std::weak_ptr (#22297)
* Replace all Context references with std::weak_ptr

* Fix shared context captured by value

* Fix build

* Fix Context with named sessions

* Fix copy context

* Fix gcc build

* Merge with master and fix build

* Fix gcc-9 build
2021-04-11 02:33:54 +03:00

35 lines
936 B
C++

#pragma once
#include <common/types.h>
#include <Core/NamesAndTypes.h>
#include <Parsers/IdentifierQuotingStyle.h>
#include <Storages/SelectQueryInfo.h>
#include <Interpreters/Context_fwd.h>
namespace DB
{
class IAST;
/** For given ClickHouse query,
* creates another query in a form of
*
* SELECT columns... FROM db.table WHERE ...
*
* where 'columns' are all required columns to read from "left" table of original query,
* and WHERE contains subset of (AND-ed) conditions from original query,
* that contain only compatible expressions.
*
* Compatible expressions are comparisons of identifiers, constants, and logical operations on them.
*/
String transformQueryForExternalDatabase(
const SelectQueryInfo & query_info,
const NamesAndTypesList & available_columns,
IdentifierQuotingStyle identifier_quoting_style,
const String & database,
const String & table,
ContextPtr context);
}