[ 
https://issues.apache.org/jira/browse/DERBY-3033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528416
 ] 

A B commented on DERBY-3033:
----------------------------

> I played around with the skipScan repro case and confirmed Kathey's suspicion
> about BaseActivation.getColumnFromRow

Thank you for your continued investigation of this issue, Bryan.  It's great to 
have an idea of the codepath in question here.  Have you had the 
time/inclination to look into the cause of the null value in row[rsNumber]?  I 
realize that's easy to say and quite hard to do, but I was just wondering if 
you've looked at it, or if you have the time and plans to do so?

In particular, I'm referring to the code comment that Kathey mentioned:

  "NoPutResultSetImpl.clearOrderableCache attempts to prefetch invariant values
   into a cache. This fails in some deeply nested joins."

I think the core question here is *why* does "this fail in some deeply nested 
joins"?  That sounds awfully suspicious.  It seems that either a) the "failure" 
is acceptable and the comments need to be updated, in which case Kathey's 
"quick fix" of checking for the null value would be appropriate; or b) the 
"failure" is a bug and in order to solve this issue, that failure should 
(ideally) be fixed...

Would you agree?

> select query results in nullpointer exception in skipScan()
> -----------------------------------------------------------
>
>                 Key: DERBY-3033
>                 URL: https://issues.apache.org/jira/browse/DERBY-3033
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.2.0
>         Environment: Windows XP, Java 5.0, JDBC, Derby 10.2.2.0
>            Reporter: Haolan Qin
>         Attachments: bug4736.sql, d3033-sane-ij-session-10.3.1.5.txt, 
> query_plan.new, query_plan.old, test.rar, test.zip, viewer_10_1.zip
>
>
> The following error was repeatedly thrown when we tried to run a select query 
> via JDBC. Strangely, the exact same select query did not trigger any error 
> when run from the command line console. After we added an index, the error 
> went away completely. 
> java.lang.NullPointerException
>  at org.apache.derby.impl.sql.execute.NoPutResultSetImpl.skipScan(Unknown 
> Source)
>  at org.apache.derby.impl.sql.execute.TableScanResultSet.openCore(Unknown 
> Source)
>  at 
> org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.openCore(Unknown 
> Source)
>  at 
> org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown 
> Source)
>  at org.apache.derby.impl.sql.execute.JoinResultSet.openRight(Unknown Source)
>  at org.apache.derby.impl.sql.execute.JoinResultSet.openCore(Unknown Source)
>  at 
> org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown 
> Source)
>  at org.apache.derby.impl.sql.execute.SortResultSet.openCore(Unknown Source)
>  at 
> org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown 
> Source)
>  at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(Unknown 
> Source)
>  at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>  at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
>  at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown 
> Source)
>  at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source)
>  at org.apache.derby.impl.drda.DRDAStatement.execute(Unknown Source)
>  at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
>  at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to