-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6880 from leiysky/fix-order-by
fix(planner): Fix order by column with invalid table name
- Loading branch information
Showing
6 changed files
with
75 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
statement ok | ||
set enable_planner_v2 = 1; | ||
|
||
statement ok | ||
create table order_test(a int null); | ||
|
||
statement ok | ||
insert into order_test values(1),(2),(null); | ||
|
||
statement query I | ||
select * from order_test order by a; | ||
|
||
---- | ||
1 | ||
2 | ||
NULL | ||
|
||
statement query I | ||
select * from order_test order by a desc; | ||
|
||
---- | ||
2 | ||
1 | ||
NULL | ||
|
||
statement query I | ||
select * from order_test order by a nulls first; | ||
|
||
---- | ||
NULL | ||
1 | ||
2 | ||
|
||
statement error | ||
select number from numbers(10) as a order by b.number; | ||
|
||
statement error | ||
select number from (select * from numbers(10) as b) as a order by b.number; | ||
|
||
statement ok | ||
drop table order_test; |
ee7b06b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
databend – ./
databend.vercel.app
databend-git-main-databend.vercel.app
databend.rs
databend-databend.vercel.app