I've been working on a project to add support for the ROLLUP style of GROUP BY processing to the Derby engine. This project has been underway for two and a half years!
I finally got to the point where I felt that the code was solid enough to warrant being committed to the trunk, where the entire Derby development community can work with it and continue to improve it.
There is still lots more to do in this area:
- I need to write documentation
- There are already some open bugs, specifically involving the nullability of columns when a ROLLUP query is used as a sub-query of a larger query (!)
- The initial implementation only implements part of the SQL standard, so I need to understand where the current implementation falls short of the standard, and what it will take to fully implement the standard.
It's exciting that, at the same time, Dag Wanvik is also working in this part of Derby, enhancing and extending the OFFSET/FETCH, ROW_NUMBER, and other window-related features. Hopefully we will find some users of Derby who want to take advantage of these new features.
Even if we don't, though, I learned an enormous amount about the internals of the Derby SQL execution engine by doing this work, so I'm happy just to have made it this far.