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

Thomas Mueller commented on OAK-3230:
-------------------------------------

Ah oak-lucene fails with a NPE, so we do have enough tests:

{noformat}
testNtFile(org.apache.jackrabbit.oak.jcr.query.TextExtractionQueryTest)  Time 
elapsed: 0.207 sec  <<< ERROR!
java.lang.NullPointerException
        at 
org.apache.jackrabbit.oak.plugins.index.aggregate.AggregationCursor.fetchNext(AggregationCursor.java:91)
        at 
org.apache.jackrabbit.oak.plugins.index.aggregate.AggregationCursor.hasNext(AggregationCursor.java:76)
        at 
org.apache.jackrabbit.oak.query.ast.SelectorImpl.next(SelectorImpl.java:402)
        at 
org.apache.jackrabbit.oak.query.QueryImpl$RowIterator.fetchNext(QueryImpl.java:780)
        at 
org.apache.jackrabbit.oak.query.QueryImpl$RowIterator.hasNext(QueryImpl.java:805)
        at 
org.apache.jackrabbit.oak.jcr.query.QueryResultImpl$4.fetch(QueryResultImpl.java:172)
{noformat}

> Yes, virtual row check should have been fine against nextRow. I didn't want 
> to update currentRow directly with cursor.next() as it seemed current row for 
> aggregation cursor shouldn't be virtual.

Yes aggregation in combination with virtual rows is unexpected. But I guess 
queries that produce virtual rows don't use aggregation, so we should be fine.

> Query engine should support virtual index rows
> ----------------------------------------------
>
>                 Key: OAK-3230
>                 URL: https://issues.apache.org/jira/browse/OAK-3230
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>          Components: query
>            Reporter: Vikas Saurabh
>            Assignee: Thomas Mueller
>             Fix For: 1.3.5
>
>         Attachments: OAK-3230-query-engine-should-support-virtual-rows.patch
>
>
> As discussed in OAK-3156 
> [here|https://issues.apache.org/jira/browse/OAK-3156?focusedCommentId=14645712&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14645712]
>  and 
> [here|https://issues.apache.org/jira/browse/OAK-3156?focusedCommentId=14655273&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14655273],
>  we need support for virtual rows returned by indices (rows where path 
> property doesn't make sense).
> Talked to [~tmueller] and we should have a new method in {{IndexRow}} to 
> clearly mark the intent that the row is virtual and hence should be treated 
> accordingly by the query engine.



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

Reply via email to