-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(sql): allow selecting aliased column followed by wildcard #3034
Conversation
Similar error still occurs if there's a join : create table xo1 as
(
select
rnd_double(0)*100 a,
rnd_long() l,
timestamp_sequence(0, 10000) k
from long_sequence(3)
) timestamp(k);
create table xo2 as
(
select
rnd_double(0)*100 a,
rnd_long() l,
timestamp_sequence(0, 10000) k
from long_sequence(3)
) timestamp(k);
select cast(xo1.k as long), cast(xo2.k as long), *
from xo1
join xo2 on xo1.k = xo2.k;
--or
select rnd_int()*k as zz, *
from xo1
join xo2 on xo1.k = xo2.k;
--Duplicate column [name=k] |
@bziobrowski good catch. Let me take a look at joins. |
…followed_by_wildcard
Addressed in 0087879 Note: select rnd_int()*k as zz, *
from xo1
join xo2 on xo1.k = xo2.k;** This query is incorrect: should be |
Should this work for cross join as well? select *, xo1.k as kk1 from xo1 cross join xo2;
-- vs
select xo1.k as kk1, * from xo1 cross join xo2; |
Yes, it should. Fixed that in 3404ce6 |
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.
Looks good
[PR Coverage check]😍 pass : 8 / 8 (100.00%) file detail
|
Fixes #2870