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