Set distinct_on_expression_list to null white transforming to limit_by

This commit is contained in:
Vladimir 2021-07-07 12:48:39 +03:00 committed by GitHub
parent d9195c6f4a
commit 35ca8b97ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -367,6 +367,7 @@ bool ParserSelectQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
/// Transform `DISTINCT ON expr` to `LIMIT 1 BY expr`
limit_by_expression_list = distinct_on_expression_list;
limit_by_length = std::make_shared<ASTLiteral>(Field{UInt8(1)});
distinct_on_expression_list = nullptr;
}
/// Because TOP n in totally equals LIMIT n