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

Andy Seaborne commented on JENA-111:
------------------------------------

For reference,  the full possible stack of modifiers possible in a single level 
of SPARQL query is:

  Limit/Offset
     Distinct/reduce
       project
         OrderBy
            Bindings
                having
                   select expressions
                         group

but, by using subSELECTs, you can write any sequence you want.

SELECT DISTINCT ?x 
{
   ?x :p 123 .
} ORDER BY ?x LIMIT 2

  (slice _ 2
    (distinct
      (project (?x)
        (order (?x)
          (bgp (triple ?x :p 123))))))


> Improving TopN optimization in case of an intermediate OpModifier
> -----------------------------------------------------------------
>
>                 Key: JENA-111
>                 URL: https://issues.apache.org/jira/browse/JENA-111
>             Project: Jena
>          Issue Type: Improvement
>          Components: ARQ
>            Reporter: Sara Magliacane
>            Assignee: Paolo Castagna
>            Priority: Minor
>              Labels: arq, optimization
>         Attachments: topk_project.patch
>
>
> In the TopN optimization (Jena-89)  it would be useful to handle also the 
> case in which there are some other OpModifiers (I think they are the only 
> category of Ops that can be in that position in the tree) between Slice and 
> Order By, for example OpProject:
> (slice _1
>   (project ?s ...
>     (order by <condition>
> -> 
> (project ?s ...
>   (top 1 <condition>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to