stackql / stackql/stackql-devel
[BUG] View column aliasing does not work
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Aliased view columns are not yet supported, as per screen capture.
To Reproduce
This works:
create view cross_cloud_disks1 as
select 'google' as vendor, name, split_part(split_part(type, '/', 11), '-', 2) as type, sizeGb from google.compute.disks where project = 'stackql-demo' and zone = 'australia-southeast1-a'
union
select 'aws' as vendor, volumeId as name, volumeType as type, size as SizeGb from aws.ec2.volumes where region = 'ap-southeast-2'
;
select * from cross_cloud_disks1;
This does not work:
create view cross_cloud_disks2 as
select 'google' as vendor, name, split_part(split_part(type, '/', 11), '-', 2) as type, sizeGb as size from google.compute.disks where project = 'stackql-demo' and zone = 'australia-southeast1-a'
union
select 'aws' as vendor, volumeId as name, volumeType as type, size from aws.ec2.volumes where region = 'ap-southeast-2'
;
select * from cross_cloud_disks2;
This simpler view also does not work:
create view cross_cloud_disks3 as
select 'google' as vendor, name, split_part(split_part(type, '/', 11), '-', 2) as type, sizeGb as size from google.compute.disks where project = 'stackql-demo' and zone = 'australia-southeast1-a'
;
select * from cross_cloud_disks3;
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the three SQL view definitions in the issue and compare the working cross_cloud_disks1 query with the aliased columns in cross_cloud_disks2 and cross_cloud_disks3. Trace the view and SELECT handling used by the Go query engine. Done means aliased view columns resolve correctly and all three example queries return the expected results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100