add syntax for new grouping expressions
This commit is contained in:
parent
7d094182b7
commit
b703e04af3
9 changed files with 266 additions and 28 deletions
14
TODO
14
TODO
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue