Reworking ExpressionAnalyzer (preparations) [#METR-20307].

This commit is contained in:
Alexey Milovidov 2017-01-06 19:33:05 +03:00
parent 66ddb56d22
commit 2f7ff07e1f
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ struct TypeAndConstantInference
struct ExpressionInfo
{
/// Must identify identical expressions.
/// For example following two expressions in query are the same: SELECT sum(x) AS a, SUM(t.x) AS b FROM t
/// For example following three expressions in query are the same: SELECT sum(x) AS a, SUM(t.x) AS b, a FROM t
UInt128 id {};
ASTPtr node;
DataTypePtr data_type;

View File

@ -27,7 +27,7 @@ static void processElement(ASTPtr & element, const ASTPtr & select_expression_li
if (!literal->alias.empty())
throw Exception("Unsigned numeric literal " + toString(position) + " in " + toString(description)
+ " section is interpreted as positional argument, "
"but is has alias " + backQuoteIfNeed(literal->alias) + " that is not expected", ErrorCodes::UNEXPECTED_AST_STRUCTURE);
"but it has alias " + backQuoteIfNeed(literal->alias) + " that is not expected", ErrorCodes::UNEXPECTED_AST_STRUCTURE);
if (position == 0)
throw Exception("Unsigned numeric literal 0 in " + toString(description) + " section is interpreted as positional argument, "