db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-4845) Improve the dependency tracking for our build targets
Date Fri, 04 Nov 2011 10:53:00 GMT

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

Knut Anders Hatlen updated DERBY-4845:

    Attachment: d4845-iapi-slimmer-nodefactory.diff

The NodeFactory class depends on the implementation classes QueryTreeNode, ResultColumnList
and ResultSetNode. There's even a comment saying that these classes shouldn't have been used

/* Strictly speaking we shouldn't import classes under the impl hierarchy here
 * but this is work in progress.
 * manish - Wed Mar 28 13:05:19 PST 2001
import  org.apache.derby.impl.sql.compile.QueryTreeNode;
import org.apache.derby.impl.sql.compile.ResultColumnList;
import org.apache.derby.impl.sql.compile.ResultSetNode;

The proper fix is to get rid of NodeFactory completely (see DERBY-673), but that's a bigger
task. For now, we can make some smaller changes to remove its dependencies on impl classes.

The attached patch (d4845-iapi-slimmer-nodefactory.diff) is a first step. It moves the method
mapTableAsVTI() into FromBaseTable, the only class that ever calls that method. Similarly,
it moves getCreateAliasNode() into the parser (according to the code comments, it was carved
out of the parser in order to support ALTER PUBLICATION, which isn't supported by Derby).

By moving these methods out of NodeFactory and into the impl classes that use them, the dependencies
on ResultColumnList and ResultSetNode go away.

All the regression tests passed with the patch.

(One small change in the patch that may look unrelated, is the signature change for MethodCallNode.addParms().
Now it accepts java.util.List instead of java.util.Vector. This was done so that we didn't
have to move the emptyVector field from NodeFactory to FromBaseTable. With the signature change,
we could use Collections.EMPTY_LIST instead, and simply remove the emptyVector field from
NodeFactory instead of moving it into FromBaseTable.)
> Improve the dependency tracking for our build targets
> -----------------------------------------------------
>                 Key: DERBY-4845
>                 URL: https://issues.apache.org/jira/browse/DERBY-4845
>             Project: Derby
>          Issue Type: Bug
>          Components: Build tools
>    Affects Versions:
>            Reporter: Rick Hillegas
>         Attachments: check-build.ksh, d4845-iapi-dependablefinder.diff, d4845-iapi-resultsetstatistics.diff,
d4845-iapi-slimmer-nodefactory.diff, d4845-iapi-statementnode.diff, derby-4845-01-aa-removeParserPrep,
derby-4845-02-aa-flipUtilsAndTypes.diff, tools-i18n.diff
> Derby is supposed to have an incremental build. That is, if you change a file, then the
following command should recompile the file:
>    ant all
> There are several places in the graph of Derby build targets where this is not true.
If you change a file in certain packages, a subsequent "ant all" won't notice the change.
This issue is a place where we can track these bugs.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message