mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 19:12:03 +00:00
unknown field
This commit is contained in:
parent
fa07d1cf86
commit
5a7ca354a5
@ -14,6 +14,8 @@
|
||||
namespace DB
|
||||
{
|
||||
|
||||
const Field UNKNOWN_FIELD = Field(3);
|
||||
|
||||
namespace ErrorCodes
|
||||
{
|
||||
extern const int INCORRECT_QUERY;
|
||||
@ -162,7 +164,7 @@ UniqueCondition::UniqueCondition(
|
||||
expression_ast = select.prewhere_expression->clone();
|
||||
else
|
||||
/// 0b11 -- can be true and false at the same time
|
||||
expression_ast = std::make_shared<ASTLiteral>(Field(3));
|
||||
expression_ast = std::make_shared<ASTLiteral>(UNKNOWN_FIELD);
|
||||
|
||||
/// Do not proceed if index is useless for this query.
|
||||
if ((useless = checkASTAlwaysUnknownOrTrue(expression_ast)))
|
||||
@ -218,7 +220,7 @@ void UniqueCondition::traverseAST(ASTPtr & node) const
|
||||
}
|
||||
|
||||
if (!atomFromAST(node))
|
||||
node = std::make_shared<ASTLiteral>(Field(3)); /// can_be_true=1 can_be_false=1
|
||||
node = std::make_shared<ASTLiteral>(UNKNOWN_FIELD); /// can_be_true=1 can_be_false=1
|
||||
}
|
||||
|
||||
bool UniqueCondition::atomFromAST(ASTPtr & node) const
|
||||
|
Loading…
Reference in New Issue
Block a user