-
Notifications
You must be signed in to change notification settings - Fork 2k
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 #9658 from Mytherin/issue684
In set operations ORDER BY columns refer to the first set operation in SQL - so the reference is not ambiguous
- Loading branch information
Showing
6 changed files
with
59 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# name: test/sql/setops/ambiguous_order_by.test | ||
# description: Ambiguous ORDER BY in set ops | ||
# group: [setops] | ||
|
||
query II | ||
select * from (values(42, 84)) s1(c1, c2) union all select * from (values(84, 42)) s2(c2, c3) order by c1; | ||
---- | ||
42 84 | ||
84 42 | ||
|
||
query II | ||
select * from (values(42, 84)) s1(c1, c2) union all select * from (values(84, 42)) s2(c2, c3) order by c3; | ||
---- | ||
84 42 | ||
42 84 |
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