You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2015/08/26 12:03:45 UTC
[jira] [Commented] (OAK-3230) Query engine should support virtual
index rows
[ https://issues.apache.org/jira/browse/OAK-3230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14712871#comment-14712871 ]
Thomas Mueller commented on OAK-3230:
-------------------------------------
The change in AggregationCursor looks wrong to me:
{noformat}
if (cursor.hasNext()) {
IndexRow nextRow = cursor.next();
if (!currentRow.isVirtualRow()) {
currentRow = nextRow;
String path = currentRow.getPath();
aggregates = Iterators.filter(Iterators.concat(
Iterators.singletonIterator(path),
aggregator.getParents(rootState, path)), Predicates
.not(Predicates.in(seenPaths)));
}
fetchNext();
return;
}
{noformat}
For example currentRow could be null here, so that could result in a NPE. I think it should be:
{noformat}
if (cursor.hasNext()) {
currentRow = cursor.next();
if (!currentRow.isVirtualRow()) {
String path = currentRow.getPath();
aggregates = Iterators.filter(Iterators.concat(
Iterators.singletonIterator(path),
aggregator.getParents(rootState, path)), Predicates
.not(Predicates.in(seenPaths)));
}
fetchNext();
return;
}
{noformat}
> 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)