stackql / stackql/stackql-devel
[BUG] Attempts at view composition can produce awful errors
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
View composition can lead to unintelligible error, as per screen capture. Tactical fix is disallow views citing views at creation time.
To Reproduce
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' ;
-- simple view composition (surprisingly) does work
create view zz as select * from cross_cloud_disks1;
select * from zz;
-- less suprisingly, complex view composition does NOT work
create view zz1 as select * from cross_cloud_disks1 d1 inner join cross_cloud_disks1 d2 on d1.name = d2.name ;
select * from zz1;
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
No file or test is named. Start by reproducing the SQL examples for simple and joined view composition, then trace the view-creation path and its error handling. Done means view composition is rejected at creation time with a clear error, with coverage for the demonstrated cases.
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