-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FLASH-451: Let qualified column reference not resolve to alias (#209)
* Let qualified column reference not resolve to alias, partial based on ClickHouse #4351 * Add alias test * Address comments
- Loading branch information
1 parent
9512e10
commit 6536d62
Showing
3 changed files
with
24 additions
and
2 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,17 @@ | ||
>> DBGInvoke __enable_schema_sync_service('false') | ||
|
||
# Unqualified identifiers resolve to alias in select list. | ||
>> select 0 as c, c + 1 as c1 from (select 1 as c) as t where c = 1; | ||
|
||
# Qualified identifiers resolve to column in table. | ||
>> select 0 as c, t.c + 1 as c1 from (select 1 as c) as t where t.c = 1; | ||
┌─c─┬─c1─┐ | ||
│ 0 │ 2 │ | ||
└───┴────┘ | ||
|
||
# Combine the above two. | ||
>> select 0 as c, c + 1 as c1 from (select 1 as c) as t where t.c = 1; | ||
┌─c─┬─c1─┐ | ||
│ 0 │ 1 │ | ||
└───┴────┘ | ||
|