db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey Lichtman <swa...@rcn.com>
Subject Re: Reuse apache derby parser
Date Fri, 09 Dec 2005 20:29:10 GMT

>is it possible to reuse the class 
>"org.apache.derby.impl.sql.compile.ParserImpl" to transform an SQL 
>query into a query tree (consisting of relational algebra operators).

The query tree produced by the parser is not in the form of 
relational algebra operators. At this point of processing in Derby, 
the nodes in the tree pretty much correspond to the syntactic 
elements of the original query, e.g. a SELECT statement would have a 
SelectNode with a select list, a FROM list and a qualification hanging off it.

The various processing steps before code generation convert the tree 
from its original form to something more closely resembling 
relational algebra. A lot of this happens in the optimizer, which 
changes the FROM list into a tree of JOIN nodes.

                        -        Jeff Lichtman
                                 Check out Swazoo Koolak's Web Jukebox at

View raw message