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

Martin Pekár commented on JENA-2020:
------------------------------------

{{The executor for OpExistence is seen below:}}
{code:java}
protected QueryIterator execute(OpExistence opExistence, QueryIterator input) {
    OpBGP bgp = new OpBGP(BasicPattern.wrap(opExistence.getCoveringTriples()));
    QueryIterator coveringIter = exec(bgp, input);
    Triple checkTriple = opExistence.getCheckTriple().getTriple();

    while (coveringIter.hasNext())
    {
        checkTriple = TripleConretise.concretiseTriple(checkTriple, 
coveringIter.nextBinding());
    }

    return checkTriple.isConcrete() ? exec(opExistence.getBGPNotReordered(), 
input) : emptyIterator();
}{code}
The call to checkTriple.isConcrete() is true in all tests. The call to exec in 
the third line would return a new iterator, which I iterate. But on the last 
line, I return a new iterator with the BGP in the subOp. I don't understand why 
this returned iterator is empty since it only executes the executor for OpBGP 
and returns it.

> Purpose of EvaluatorSimple and OpExecutor
> -----------------------------------------
>
>                 Key: JENA-2020
>                 URL: https://issues.apache.org/jira/browse/JENA-2020
>             Project: Apache Jena
>          Issue Type: Question
>          Components: ARQ
>            Reporter: Martin Pekár
>            Priority: Major
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I am in the midst of adding a new operator in the transformation of OpBGP. I 
> am now trying to implement the execution of the operator in the query plan, 
> but I am now slightly confused about the purpose of EvaluatorSimple used in 
> EvaluatorDispatch and OpExecutor. At the moment, it seems like they are doing 
> the same thing. The difference seems to be that OpExecutor stores the result 
> of applying the operator in a QueryIterator, whereas EvaluatorSimple stores 
> its result in a Table of bindings.
> Can someone give me an explanation of purposes of these two classes and how 
> they should be used?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to