1
Fork 0

add syntax for new grouping expressions

This commit is contained in:
Jake Wheat 2013-12-17 19:17:03 +02:00
parent 7d094182b7
commit b703e04af3
9 changed files with 266 additions and 28 deletions

14
TODO
View file

@ -7,6 +7,19 @@ group by extensions. Question: some of the syntax can be represented
by app and row ctor, should this be reused or new syntax created
(the standard has special grammar for cube and rollup).
SELECT EmpId, Yr, SUM(Sales) AS Sales
FROM Sales
GROUP BY GROUPING SETS((EmpId, Yr), (EmpId), ())
SELECT EmpId, Yr, SUM(Sales) AS Sales
FROM Sales
GROUP BY GROUPING SETS((EmpId, Yr), (EmpId))
{ (grouping_column[, ...]) | ROLLUP (grouping_column[, ...]) |
CUBE (grouping_column[, ...]) | GROUPING SETS (grouping_set_list) |
( ) | grouping_set, grouping_set_list }
collate? -> postfix operator which binds very tightly:
a < 'foo' collate 'C'
->
@ -15,6 +28,7 @@ Op "<" [Iden "a", SpecialOp "collate" [StringLit 'foo', StringLit
also postfix in order by:
select a from t order by a collate 'C': add to order by syntax, one
collation per column
have to do fixity for this to work
much more table reference tests, for joins and aliases etc.