db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Army <qoz...@gmail.com>
Subject Re: [jira] Commented: (DERBY-47) Some possible improvements to IN optimization
Date Tue, 19 Dec 2006 00:28:07 GMT
James Synge (JIRA) wrote:

> 	// Issue: how do I assign the table number for the FromVTI?

In the "bindNonVTITables()" method of FromVTI there is the following call:

   /* Assign the tableNumber.  (All other work done in bindVTITables() */
   if (tableNumber == -1)  // allow re-bind, in which case use old number
	tableNumber = getCompilerContext().getNextTableNumber();

So you probably have to make call similar to that.  I.e. if you make the calls 
to "bind" the FromVTI, I think the table number gets assigned as part of that 
call...

> 	// Issue: how do I get binding done for this new SelectNode?
> 	// 		(this is obviously trivial, but needs to be done)

I took a quick look at DMLStatementNode and it looks like binding of a top level 
ResultSetNode (which includes a SELECT node) involves calling the following 
three methods:

   bindNonVTITables(...)
   bindVTITables(...)
   bindExpressions(...)

See DMLStatementNode.bind().  So would it be possible to make those calls on the 
SelectNode in question?

Army


Mime
View raw message