[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2021-01-20 Thread Andy Seaborne (Jira)


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

Andy Seaborne commented on JENA-2020:
-

I hope you have had your original question answered.

BTW dev@jena.apache.org is probably a better place for questions. We use Jira 
for development issues.

> 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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2021-01-04 Thread Jira


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

Martin Pekár commented on JENA-2020:


It seems like I need to copy the input iterator twice without consuming it.

It's probably an unanswerable question, but any ideas why just returning 
\{{exec}} with the {{OpBGP}} in the {{subOp}} of {{OpExistence}} and {{input}} 
returns an empty QueryIterator? Because, this is exactly what {{OpExistence}} 
is supposed to do after doing some check.

> 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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2021-01-04 Thread Andy Seaborne (Jira)


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

Andy Seaborne commented on JENA-2020:
-

There are at least two root iterators. The one starting the query, which is or 
is connected to , {{QueryIterator input}} and {{root()}} which is another root 
(no parent) iterator.

> 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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2021-01-04 Thread Jira


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

Martin Pekár commented on JENA-2020:


But in the query plan, {{OpExistence}} is the second last operator just before 
{{OpBGP}}. If I do nothing but immediately call {{exec()}} with the sub 
operator of {{OpExistence}} (which is a {{OpBGP}}), then I should get the same 
result as if {{OpExistence}} wasn't in the query plan. I have debugged both the 
concretise code and the {{OpExistence}} itself, and everything seems to be as 
it should be. The shorthand if-statement is also true in all the cases it 
should be, so the last call to {{exec()}} should return a result just as if the 
{{OpExistence}} operator wasn't present.

It also seems weird the iterator hasn't been used and returns that warning. The 
{{StageGenerator}} should make use of 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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2021-01-04 Thread Andy Seaborne (Jira)


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

Andy Seaborne commented on JENA-2020:
-

Impossible to say what is happening - something in the {{OpExistence}} or 
{{concretise}} code.

The WARN indicates that some code somewhere is not reading its input iterator 
nor explicitly closing 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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2021-01-03 Thread Jira


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

Martin Pekár commented on JENA-2020:


I still get the same problem using root(). Furthermore, I also get the error 
when I do nothing but the following:
{code:java}
return exec((OpBGP) opExistence.getSubOp(), input);{code}
The code for OpExistence in ExecutionDispatch is like most other operator:
{code:java}
QueryIterator qIter = opExecutor.execute(opExistence, pop());
push(qIter);{code}

> 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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2021-01-02 Thread Andy Seaborne (Jira)


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

Andy Seaborne commented on JENA-2020:
-

{quote}{{QueryIterator coveringIter = exec(bgp, input);}}{quote}

and then you exhaust {{coveringIter}} but {{coveringIter}} uses {{input}} so 
{{input}} has ended. So {{exec(opExistence.getBGPNotReordered(), input)}} is 
passing a used up iterator {{input}}.

> 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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2021-01-02 Thread Jira


[ 
https://issues.apache.org/jira/browse/JENA-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2020-12-30 Thread Andy Seaborne (Jira)


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

Andy Seaborne commented on JENA-2020:
-

It's an iterator - once used, that's it. No more results. Return 
{{Iter.toList()}}.

Once a Java iterator {{hasNext}} goes false, it stays false.


> 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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2020-12-30 Thread Jira


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

Martin Pekár commented on JENA-2020:


{{I tried consuming the iterator and disregarding the value of .next(). I 
returned the consumed iterator, but still the same result.}}

{{The OpExistence operator chooses a triple in a BGP that contains at most two 
variables. It then finds a subset of triples in the BGP that have the same 
variables that can cover the variables in the chosen triple. The operator must 
then use the computed values of the variables in the covering triples in the 
BGP and substitute the chosen triple with these values. If the chosen triple 
then is concrete, then I assume it exists. So yes, it's related to FILTER 
EXISTS.}}

> 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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2020-12-30 Thread Andy Seaborne (Jira)


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

Andy Seaborne commented on JENA-2020:
-

Note the return type - {{QueryIterator}}.

Most of the main query engine is streaming - the results are calculated when 
the iterator moves forward ({{.hasNext}}/{{.next}}). If you want to make it 
happen, you have to consume the iterator.

Sometimes, the results are calculated immediately and/or completely on first 
result (e.g. a sort, or the related `OpTopN`; group+aggregation in subqueries).

The reference engine calculates everything immediately and returns an iterator 
over the table of calculated results. Needs more memory to do that.



What does {{OpExistence}} aim to do? Is it related to {{FILTER EXISTS}}?

> 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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2020-12-30 Thread Andy Seaborne (Jira)


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

Andy Seaborne commented on JENA-2020:
-

Note the return type - {{QueryIterator}}.

Most of the main query engine is streaming - the results are calculated when 
the iterator moves forward ({{.hasNext}}/{{.next}}). If you want to make it 
happen, you have to consume the iterator.

Sometimes, the results are calculated immediately and/or completely on first 
result (e.g. a sort, or the related `OpTopN`; group+aggregation in subqueries).

The reference engine calculates everything immediately and returns an iterator 
over the table of calculated results. Needs more memory to do that.



What does {{OpExistence}} aim to do? Is it related to {{FILTER EXISTS}}?

> 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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2020-12-30 Thread Jira


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

Martin Pekár commented on JENA-2020:


Yes, you are right. But running the tests shows that nothing is returned by 
just returning the {{exec}} method passing the sub-operator (which is an OpBGP) 
and the passed {{input }}as a test. I assumed by doing this, the output of the 
new operator should be the same as for OpBGP.

I have checked to make sure the sub-operator is exactly the same BGP as before 
any optimization.

> 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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2020-12-27 Thread Andy Seaborne (Jira)


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

Andy Seaborne commented on JENA-2020:
-

Look at the current code for inspiration: {{OpFilter}} for example or another 
{{Op1}}.

{{input}} is passed from outside e.g. {{OpSequence}}. If the query is purely 
bottom-up at this point, it will be the root which is one row, no bindings.

Calls {{QueryIterator qIter = exec(base, input) ;}} to execute the sub-op, 
using the external;y passed in {{QueryIterator}} (which may be the root - i.e. 
nothing). It now has the QueryIterator for the BGP and it filters that with 
{{QueryIterFilterExpr}}.

Looks like you want to do the same. Execute the sub-op. Try a few cases and 
stop in the debugger.

{noformat}
 protected QueryIterator execute(OpFilter opFilter, QueryIterator input) {
ExprList exprs = opFilter.getExprs() ;

Op base = opFilter.getSubOp() ;
QueryIterator qIter = exec(base, input) ;

for (Expr expr : exprs)
qIter = new QueryIterFilterExpr(qIter, expr, execCxt) ;
return qIter ;
}
{noformat}

> 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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2020-12-27 Thread Jira


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

Martin Pekár commented on JENA-2020:


In my case, I am adding a new operator OpExistence in a transformation of 
OpBGP. This would make the query plan look like below:

{{(existence}}

{{  (bgp}}

{{    (triple a b c)}}

{{    (triple d e f)}}

{{  )}}

{{)}}

 

{{So when I say "before", it is because I read the existence tag before the bgp 
tag in the query plan. So, in my understanding, the QueryIterator passed to the 
evaluation step for OpExistence is the QueryIterator returned from OpBGP. Is 
that correct?}}

> 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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2020-12-27 Thread Andy Seaborne (Jira)


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

Andy Seaborne commented on JENA-2020:
-

Only one per execution - which is determined by {{QueryEngineFactory}} and 
{{QueryEngineRegistry}}.

Not sure what you mean by "before" here. The {{QueryIterator}} passed into an 
evaluation step is the previous stage if it is part of an {{OpSequence}} or 
{{OpDisjunction}} otherwise it is step below in the execution tree (see, for 
example, {{OpJoin}}).

 

> 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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2020-12-27 Thread Jira


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

Martin Pekár commented on JENA-2020:


So, when querying a graph, only one of EvaluatorSimple and OpExecutor is used, 
right?

Furthermore, If I were to add a new operator right before OpBGP in the query 
plan, would the QueryIterator given as input to the new operator in OpExecutor 
consist of bindings created in OpBGP, assuming I call pop() in 
ExecutionDispatch?

> 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)


[jira] [Commented] (JENA-2020) Purpose of EvaluatorSimple and OpExecutor

2020-12-27 Thread Andy Seaborne (Jira)


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

Andy Seaborne commented on JENA-2020:
-

ARQ has two separate query evaluators - a simple one, {{EvaluatorSimple}}, (the 
"ref" engine, {{--engine=ref}} on the command line) that does no smarts and 
materializes intermediate results. It is (almost) completely separate and is 
supposed to be simple you can just look at it, inspect the execution (the 
intermediate results) and be confident it is doing the right thing. It is 
useful for comparing output from the main engine. They should get the same 
answers (caveat "reference" does not have all extension features).

{{OpExecutor}} is the execution used normally.

 

 

 

 

 

> 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)