mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 02:12:21 +00:00
5b3ab48861
The following headers are pretty generic, so use forward declaration as much as possible: - Context.h - Settings.h - ConnectionTimeouts.h (Also this shows that some missing some includes -- this has been fixed) And split ConnectionTimeouts.h into ConnectionTimeoutsContext.h (since module part cannot be added for it, due to recursive build dependencies that will be introduced) Also remove Settings from the RemoteBlockInputStream/RemoteQueryExecutor and just pass the context, since settings was passed only in speicifc places, that can allow making a copy of Context (i.e. Copier). Approx results (How much units will be recompiled after changing file X?): - ConnectionTimeouts.h - mainline: 100 - Context.h: - mainline: ~800 - patched: 415 - Settings.h: - mainline: 900-1K - patched: 440 (most of them because of the Context.h)
28 lines
718 B
C++
28 lines
718 B
C++
#pragma once
|
|
|
|
#include <Parsers/IParserBase.h>
|
|
#include <Parsers/ExpressionElementParsers.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
struct SettingChange;
|
|
|
|
/** Query like this:
|
|
* SET name1 = value1, name2 = value2, ...
|
|
*/
|
|
class ParserSetQuery : public IParserBase
|
|
{
|
|
public:
|
|
explicit ParserSetQuery(bool parse_only_internals_ = false) : parse_only_internals(parse_only_internals_) {}
|
|
static bool parseNameValuePair(SettingChange & change, IParser::Pos & pos, Expected & expected);
|
|
protected:
|
|
const char * getName() const override { return "SET query"; }
|
|
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
|
|
/// Parse the list `name = value` pairs, without SET.
|
|
bool parse_only_internals;
|
|
};
|
|
|
|
}
|