In SelectNode, the instance variables generatedForGoupByClause and generatedForHavingClause are never set. I have removed these variables as well as code that depends on them being true.
This is a small and self-contained patch. Hopefully someone can review this sooner than later. After this, the instance variables generatedForGroupByClause/HavingClause in FromSubquery.
Patch looks good. I'm running tests, and will commit later today unless anyone objects.
Removing dead code is important to keep/make the source code understandable.
The patch doesn't compile:
[javac] java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java:701: cannot find symbol
[javac] symbol : method getGeneratedForGroupbyClause()
[javac] location: class org.apache.derby.impl.sql.compile.SelectNode
[javac] (! select.getGeneratedForGroupbyClause()))
[javac] 1 error
Please update the patch, and I'll get back to it. Reset patch available flag.
I'm sorry-- I had two different sets of changes in my environment. If you update to svn # 518687, this patch should compile.
the second patch, performs cleanup on FromSubquery and FromList-- removed instance variables generatedForGroupByClause and generatedForHavingClause. They can be applied together or separately. Ran junit-all and derbylang.
Commited 'post681.refactor.txt' and 'post681.refactor1.txt ' to trunk with revision 519936.
Ran derbyall and suites.All with Sun JREs 1.5.0 and 1.6.0.
Sorry, to reopen this but there is atleast another set of changes that are coming up. Thanks for the quick review and commit.
I ran derbylang, junit-all.
This is the last patch for this bug.
Committed 'post681.refactor2.txt' (removed the spurious letter 's' from SelectNode to avoid a diff) to trunk with revision 520885.
Ran suites.All/derbyall with Java SE 5.0 and 6.
Resolving the issue as this is the last patch according to the assignee. Please close the issue when the fix/patch is verifed.