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

Simon Helsen commented on JENA-294:
-----------------------------------

While I agree your version may be "more" conventional, we had clients who 
produced the one I provided. Not only that, their "less conventional query" was 
generated by a generator so I am sure they had their reasons. Finally, and this 
is important to us, they had their queries tested for performance on our 
previous adoption of 2.6.x and the move to 2.7.x turned it into a performance 
regression for them. As I have mentioned before, we are talking a few 100ms 
versus many minutes. 

So, in this case, we really need a fix for the query I provided above. 
Otherwise, we are still in the same situation as before I opened this defect 
(which is why I reopened). More generally, I am not sure why the same "trick" 
cannot be applied here. Leave filter as it is and simply push the assignment 
down. Why is that unique to OPTIONAL? 

As for providing tests for jena-arq/testing/ARQ/OptFilterEquality/, I am happy 
to add a test if I have one, but it seems that this test suite is only to check 
query correctness not whether the optimization took place, or am I missing 
something
                
> TransformFilterEquality does not handle starting OPTIONAL well
> --------------------------------------------------------------
>
>                 Key: JENA-294
>                 URL: https://issues.apache.org/jira/browse/JENA-294
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: ARQ
>    Affects Versions: Jena 2.7.4
>            Reporter: Simon Helsen
>            Assignee: Andy Seaborne
>             Fix For: ARQ 2.9.4
>
>         Attachments: jena-294-afs-1.patch, patch.txt, patch.txt, 
> test-filter-equality.zip
>
>
> There was one other case where our tests were stuck on a very slow query 
> execution because transformFilterEquality failed to optimize. The problem is 
> that the optimizer gives up whenever the WHERE clause starts with an OPTIONAL 
> clause. The reason is that the generated algebraic formula starts with a 
> TableUnit and this is not handled correctly. 
> I have attached a patch which fixes the problem

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to