db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-6593) Using a natural join, you can invoke a table function with an argument which is outside the scope of the query block.
Date Tue, 03 Jun 2014 18:27:01 GMT

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

Rick Hillegas updated DERBY-6593:
---------------------------------

               Urgency: Normal
    Bug behavior facts: Deviation from standard
               Summary: Using a natural join, you can invoke a table function with an argument
which is outside the scope of the query block.  (was: NPE when joining table with Lucene VTI)

Changing the title of this issue to indicate that this is a general problem with table functions.

> Using a natural join, you can invoke a table function with an argument which is outside
the scope of the query block.
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6593
>                 URL: https://issues.apache.org/jira/browse/DERBY-6593
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.11.0.0
>            Reporter: Knut Anders Hatlen
>
> I'm seeing a NullPointerException when joining a table with a Lucene VTI.
> Here's a script that reproduces the NPE:
> {noformat}
> ij version 10.11
> ij> connect 'jdbc:derby:memory:db;create=true';
> ij> create table t(id int primary key, x varchar(20));
> 0 rows inserted/updated/deleted
> ij> insert into t values (1, 'abc');
> 1 row inserted/updated/deleted
> ij> call syscs_util.syscs_register_tool( 'luceneSupport', true );
> 0 rows inserted/updated/deleted
> ij> call lucenesupport.createindex('app', 't', 'x', null);
> 0 rows inserted/updated/deleted
> ij> select * from t natural join (select * from table (t__x(t.x, null, 100, null))
lt) lt;
> ERROR 38000: The exception 'java.lang.NullPointerException' was thrown while evaluating
an expression.
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
> {noformat}
> Full stack trace:
> {noformat}
> java.lang.NullPointerException
> 	at org.apache.derby.iapi.types.DataType.setValue(DataType.java:537)
> 	at org.apache.derby.exe.aced8940a7x0146x5c7fx5474x0000188928898.g0(Unknown Source)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:483)
> 	at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(ReflectMethod.java:46)
> 	at org.apache.derby.impl.sql.execute.VTIResultSet.openCore(VTIResultSet.java:251)
> 	at org.apache.derby.impl.sql.execute.JoinResultSet.openCore(JoinResultSet.java:146)
> 	at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(ProjectRestrictResultSet.java:181)
> 	at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(BasicNoPutResultSetImpl.java:266)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:470)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:349)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1338)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:704)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:631)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:367)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:527)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:372)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:245)
> 	at org.apache.derby.impl.tools.ij.Main.go(Main.java:229)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:184)
> 	at org.apache.derby.impl.tools.ij.Main.main(Main.java:75)
> 	at org.apache.derby.tools.ij.main(ij.java:59)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message