mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Initialize POD members of ASTs to make it less error-prone
The cost of initializing members is insignificant in compare to parsing, while the cost of the error is high. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
b30cfe5503
commit
b680697cce
@ -16,7 +16,7 @@ public:
|
||||
std::optional<bool> null_modifier;
|
||||
String default_specifier;
|
||||
ASTPtr default_expression;
|
||||
bool ephemeral_default;
|
||||
bool ephemeral_default = false;
|
||||
ASTPtr comment;
|
||||
ASTPtr codec;
|
||||
ASTPtr ttl;
|
||||
|
@ -19,13 +19,13 @@ public:
|
||||
/// Attribute expression
|
||||
ASTPtr expression;
|
||||
/// Is attribute mirrored to the parent identifier
|
||||
bool hierarchical;
|
||||
bool hierarchical = false;
|
||||
/// Is hierarchical attribute bidirectional
|
||||
bool bidirectional;
|
||||
bool bidirectional = false;
|
||||
/// Flag that shows whether the id->attribute image is injective
|
||||
bool injective;
|
||||
bool injective = false;
|
||||
/// MongoDB object ID
|
||||
bool is_object_id;
|
||||
bool is_object_id = false;
|
||||
|
||||
String getID(char delim) const override { return "DictionaryAttributeDeclaration" + (delim + name); }
|
||||
|
||||
|
@ -11,14 +11,14 @@ namespace DB
|
||||
class ASTOrderByElement : public IAST
|
||||
{
|
||||
public:
|
||||
int direction; /// 1 for ASC, -1 for DESC
|
||||
int nulls_direction; /// Same as direction for NULLS LAST, opposite for NULLS FIRST.
|
||||
bool nulls_direction_was_explicitly_specified;
|
||||
int direction = 0; /// 1 for ASC, -1 for DESC
|
||||
int nulls_direction = 0; /// Same as direction for NULLS LAST, opposite for NULLS FIRST.
|
||||
bool nulls_direction_was_explicitly_specified = false;
|
||||
|
||||
/** Collation for locale-specific string comparison. If empty, then sorting done by bytes. */
|
||||
ASTPtr collation;
|
||||
|
||||
bool with_fill;
|
||||
bool with_fill = false;
|
||||
ASTPtr fill_from;
|
||||
ASTPtr fill_to;
|
||||
ASTPtr fill_step;
|
||||
|
Loading…
Reference in New Issue
Block a user