querycert / qcert

Compilation and Verification of Data-Centric Languages
https://querycert.github.io/
Apache License 2.0
56 stars 9 forks source link

SQL parsing for except should have same precedence as union and intersect #107

Closed jeromesimeon closed 5 years ago

jeromesimeon commented 5 years ago

This works:

select *
from employees
where age = 32
union
select *
from employees
;

But this does not:

select *
from employees
where age = 32
except
select *
from employees
;
jeromesimeon commented 5 years ago

For instance:

bash-3.2$ cat sql/org10.sql
select *
from employees
where age = 32
except
select *
from employees
;
bash-3.2$ ../bin/qcert -source sql -target dnnrc sql/org10.sql -eval -input sql/org.input -schema sql/org.schema -eval-validate -output sql/org10.out 
Fatal error: exception Util.Qcert_Error("In file [sql/org10.sql] Not well-formed S-expr inside SQL sfw block: except")