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
                                [EMAIL PROTECTED]
                                Check out Swazoo Koolak's Web Jukebox at
http://swazoo.com/

Reply via email to