db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernt M. Johnsen" <be...@sun.com>
Subject Is EXCEPT/INTERSECT complete?
Date Tue, 15 Mar 2005 14:43:26 GMT
Running the latest on trunk (svn update today), I get
NullPointerException when doing EXCEPT and INTERSECT in a view. 

If the implementation is supposed to be complete, I'll create an
issue.



ij> create table tab1 (i integer primary key);
0 rows inserted/updated/deleted
ij> insert into tab1 values (1),(2),(3),(4);
4 rows inserted/updated/deleted
ij> create table tab2 (i integer primary key);
0 rows inserted/updated/deleted
ij> insert into tab2 values (2),(4);
2 rows inserted/updated/deleted
ij> select * from tab1 intersect select * from tab2;
I          
-----------
2          
4          

2 rows selected
ij> create view view1 as select * from tab1 intersect select * from tab2;
0 rows inserted/updated/deleted
ij> select * from view1;
ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
ij>


----------------------------------------------------------------
2005-03-15 14:37:24.559 GMT:
 Booting Derby version The Apache Software Foundation - Apache Derby - 10.1.0.0 alpha - (157541M):
instance c013800d-0102-a6a5-9db8-ffffdb1a513e
on database directory /home/bj136805/ij/trunk 

Database Class Loader started - derby.database.classpath=''
2005-03-15 14:37:40.276 GMT Thread[main,5,main] (XID = 821), (SESSIONID = 0), (DATABASE =
trunk), (DRDAID = null), Cleanup action starting
2005-03-15 14:37:40.276 GMT Thread[main,5,main] (XID = 821), (SESSIONID = 0), (DATABASE =
trunk), (DRDAID = null), Failed Statement is: select * from view1
java.lang.NullPointerException
	at org.apache.derby.impl.sql.compile.IntersectOrExceptNode.estimateCost(IntersectOrExceptNode.java:229)
	at org.apache.derby.impl.sql.compile.FromTable.optimizeIt(FromTable.java:143)
	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(ProjectRestrictNode.java:302)
	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1198)
	at org.apache.derby.impl.sql.compile.SelectNode.optimize(SelectNode.java:1536)
	at org.apache.derby.impl.sql.compile.DMLStatementNode.optimize(DMLStatementNode.java:330)
	at org.apache.derby.impl.sql.compile.CursorNode.optimize(CursorNode.java:495)
	at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:347)
	at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:107)
	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:688)
	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:501)
	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:475)
	at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:299)
	at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:433)
	at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:312)
	at org.apache.derby.impl.tools.ij.Main.go(Main.java:209)
	at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:175)
	at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55)
	at org.apache.derby.tools.ij.main(ij.java:60)
Cleanup action completed


-- 
Bernt Marius Johnsen, HA Data Management, Sun Microsystems, Norway
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE: This signature is neither personal, religious, literary,
ethnic, racial, offensive nor humorous. 

Mime
View raw message