db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manish Khettry (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-681) Eliminate the parser's rewriting of the abstract syntax tree for queries with GROUP BY and/or HAVING clauses
Date Wed, 07 Mar 2007 22:19:24 GMT

     [ https://issues.apache.org/jira/browse/DERBY-681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Manish Khettry updated DERBY-681:

    Attachment: 681.patch2.txt

Again, thanks for very detailed and constructive review and for finding the problems with
union/views/create table. I ran derbylang (one failure compressTable once, DERBY-2117?) and
junit-all (one failure in a derbynet tearDown method?). Normally I would try to track this
failure but this bugfix has been sitting on my laptop for too long and it really doesn't look
like anything to do with my changes (famous last words?!)

I have accepted most of the review comments from A. B atleast partially except for 4, 6 and

> Eliminate the parser's rewriting of the abstract syntax tree for queries with GROUP BY
and/or HAVING clauses
> ------------------------------------------------------------------------------------------------------------
>                 Key: DERBY-681
>                 URL: https://issues.apache.org/jira/browse/DERBY-681
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Rick Hillegas
>         Assigned To: Manish Khettry
>         Attachments: 681.patch.txt, 681.patch2.txt, notes.txt
> If a query contains a GROUP BY or HAVING clause, the parser rewrites the abstract syntax
tree, putting aggregates into a subselect and treating the HAVING clause as the WHERE clause
of a fabricated outer select from the subquery. This allows the compiler to re-use some machinery
since the HAVING clause operates on the grouped result the way that the WHERE clause operates
on the from list. Unfortunately, this rewriting creates an explosion of special cases in the
compiler after parsing is done. The rewriting is not systematically handled later on in the
compiler. This gives rise to defects like bug 280. We need to eliminate this special rewriting
and handle the HAVING clause in a straightforward way. This is not a small bugfix but is a
medium sized project.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message