[ 
https://issues.apache.org/jira/browse/LENS-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14232842#comment-14232842
 ] 

Amareshwari Sriramadasu commented on LENS-89:
---------------------------------------------

NPE occurs when a candidate table has added reference usage for one of the 
variables, And the table itself is removed in the next iteration because one of 
the column does not exist.

For ex:
Fact1 :  x, y_id. y_id refers to table YTbl.

YTbl : id, rid, name.

Query selected x, y_r_id and z. Fact1 would add ref usage in 
DenormalizationResolver to use reference for getting y_r_id. Fact1 is then 
removed from candidates because z is not there.

Attaching a patch which fixes above scenario to remove the reference usage of 
Fact1 from DenormalizationResolver.

> getting NPE from checkForSourceReachabilityForDenormCandidates for some 
> queries
> -------------------------------------------------------------------------------
>
>                 Key: LENS-89
>                 URL: https://issues.apache.org/jira/browse/LENS-89
>             Project: Apache Lens
>          Issue Type: Bug
>            Reporter: Raghavendra Singh
>            Assignee: Amareshwari Sriramadasu
>             Fix For: 2.0
>
>
> {CODE}
> 02 Dec 2014 07:48:40,409 [QuerySubmitter] ERROR 
> org.apache.lens.server.query.QueryExecutionServiceImpl  - Error launching 
> query 4a0966ec-00af-4d12-a2b2-9e01ee6d7d56
> org.apache.lens.api.LensException: Rewriting failed, cause :null
>       at 
> org.apache.lens.driver.cube.RewriteUtil.rewriteQuery(RewriteUtil.java:278)
>       at 
> org.apache.lens.server.query.QueryExecutionServiceImpl.rewriteAndSelect(QueryExecutionServiceImpl.java:967)
>       at 
> org.apache.lens.server.query.QueryExecutionServiceImpl.access$800(QueryExecutionServiceImpl.java:89)
>       at 
> org.apache.lens.server.query.QueryExecutionServiceImpl$QuerySubmitter.run(QueryExecutionServiceImpl.java:476)
>       at java.lang.Thread.run(Thread.java:701)
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.lens.cube.parse.CandidateTableResolver.checkForSourceReachabilityForDenormCandidates(CandidateTableResolver.java:432)
>       at 
> org.apache.lens.cube.parse.CandidateTableResolver.rewriteContext(CandidateTableResolver.java:91)
>       at 
> org.apache.lens.cube.parse.CubeQueryRewriter.rewrite(CubeQueryRewriter.java:186)
>       at 
> org.apache.lens.cube.parse.CubeQueryRewriter.rewrite(CubeQueryRewriter.java:170)
> {CODE}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to