mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
fix test
This commit is contained in:
parent
a5e4495ee5
commit
0e8b26d84f
@ -50,13 +50,6 @@ bool ParserSelectQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
||||
ParserKeyword s_having("HAVING");
|
||||
ParserKeyword s_window("WINDOW");
|
||||
ParserKeyword s_order_by("ORDER BY");
|
||||
ParserKeyword ascending("ASCENDING");
|
||||
ParserKeyword descending("DESCENDING");
|
||||
ParserKeyword asc("ASC");
|
||||
ParserKeyword desc("DESC");
|
||||
ParserKeyword nulls("NULLS");
|
||||
ParserKeyword first("FIRST");
|
||||
ParserKeyword last("LAST");
|
||||
ParserKeyword s_limit("LIMIT");
|
||||
ParserKeyword s_settings("SETTINGS");
|
||||
ParserKeyword s_by("BY");
|
||||
@ -281,7 +274,7 @@ bool ParserSelectQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
||||
|
||||
/// if any WITH FILL parse possible INTERPOLATE list
|
||||
if (std::any_of(order_expression_list->children.begin(), order_expression_list->children.end(),
|
||||
[](auto & child) { return child->template as<ASTOrderByElement>()->with_fill; }))
|
||||
[](auto & child) { return child->template as<ASTOrderByElement>()->with_fill; }))
|
||||
{
|
||||
if (s_interpolate.ignore(pos, expected))
|
||||
{
|
||||
|
@ -1,20 +1,28 @@
|
||||
A 3
|
||||
B 1
|
||||
A 2
|
||||
B 3
|
||||
C \N
|
||||
B 1 1
|
||||
A 3 2
|
||||
B 3 2
|
||||
C \N 3
|
||||
B 1 1
|
||||
B 3 2
|
||||
A 3 2
|
||||
C \N 3
|
||||
C \N
|
||||
B 3
|
||||
B 1
|
||||
A 3
|
||||
\N C
|
||||
1 B
|
||||
3 A
|
||||
D 1
|
||||
1 D
|
||||
2 A
|
||||
3 B
|
||||
\N C
|
||||
B 3 10
|
||||
D 1 20
|
||||
A 2 30
|
||||
C \N 40
|
||||
D 1
|
||||
A 2
|
||||
B 3
|
||||
C \N
|
||||
B 3 10
|
||||
D 1 20
|
||||
A 2 30
|
||||
C \N 40
|
||||
D 1
|
||||
C \N
|
||||
B 3
|
||||
A 2
|
||||
\N C
|
||||
1 D
|
||||
2 A
|
||||
3 B
|
||||
|
@ -6,14 +6,17 @@ CREATE TABLE order_by_all
|
||||
b Nullable(Int32),
|
||||
all int,
|
||||
)
|
||||
engine = Memory;
|
||||
engine = Memory;
|
||||
|
||||
INSERT INTO order_by_all VALUES ('B', 3, 2), ('C', NULL, 3), ('B', 1, 1), ('A', 3, 2);
|
||||
INSERT INTO order_by_all VALUES ('B', 3, 10), ('C', NULL, 40), ('D', 1, 20), ('A', 2, 30);
|
||||
|
||||
SELECT a, b FROM order_by_all ORDER BY ALL;
|
||||
SELECT b, a FROM order_by_all ORDER BY ALL;
|
||||
SELECT a, b, all FROM order_by_all ORDER BY all; -- { serverError UNEXPECTED_EXPRESSION }
|
||||
SELECT a, b, all FROM order_by_all ORDER BY all, a;
|
||||
SELECT a, b as all FROM order_by_all ORDER BY all; -- { serverError UNEXPECTED_EXPRESSION }
|
||||
SELECT a, b, all FROM order_by_all ORDER BY all settings enable_order_by_all = false;
|
||||
SELECT a, b as all FROM order_by_all ORDER BY all settings enable_order_by_all = false;
|
||||
SELECT a, b, all FROM order_by_all ORDER BY all, a;
|
||||
SELECT a, b FROM order_by_all ORDER BY ALL DESC;
|
||||
SELECT b, a FROM order_by_all ORDER BY ALL NULLS FIRST;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user