Satheesh Bandaram wrote:
I believe this change is also needed to the original patch submitted. Minor change, but the original patch was allowing the following statement, when it should have failed:
ij> select * from app.t intersect select * from app.t1 order by t.i; I -----------
0 rows selected
Satheesh
[bandaram:satheesh] svn diff OrderByColumn.java Index: OrderByColumn.java =================================================================== --- OrderByColumn.java (revision 111541) +++ OrderByColumn.java (working copy) @@ -172,7 +172,7 @@ ResultColumnList targetCols = target.getResultColumns();
//bug 5716 - for db2 compatibility - no qualified names allowed in order by clause when union/union all operator is used - if (target instanceof UnionNode && correlationName != null) + if (target instanceof SetOperatorNode && correlationName != null ) { String fullName = (schemaName != null) ? (schemaName + "." + correlationName + "." + columnName) : [bandaram:satheesh]
Good catch Satheesh! Actually there is another bug with order by in intersect -- it is not implemented! I will post an update to my patch when I have fixed this and some other issues.
Jack
