[
https://issues.apache.org/jira/browse/JENA-1113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15090095#comment-15090095
]
ASF subversion and git services commented on JENA-1113:
-------------------------------------------------------
Commit 83654525e54240b6d70b7b36728cef561520a6c8 in jena's branch
refs/heads/master from [~andy.seaborne]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=8365452 ]
Test for JENA-1113.
> FILTER(?x IN ( .... )) causes stackoverflow for very long lists of values.
> --------------------------------------------------------------------------
>
> Key: JENA-1113
> URL: https://issues.apache.org/jira/browse/JENA-1113
> Project: Apache Jena
> Issue Type: Bug
> Components: ARQ
> Affects Versions: Jena 3.0.1
> Reporter: Andy Seaborne
> Assignee: Andy Seaborne
> Priority: Minor
> Fix For: Jena 3.1.0
>
>
> {{FILTER(?x IN ( .... ))}} with a list of 60,000+ URIs causes a stack
> overflow during execution. The list was machine generated.
> {{?x IN(C1, C2, ...)}} is expanded to {{(?x = C1 || ?x = C2 || ... )}} . In
> many places, working with expressions is a tree walk ({{ExprWalker}}).
> The transformation is to a left-deep tree: for a 4-long list:
> {noformat}
> (||
> (||
> (|| (= ?x C1)
> (= ?x C2))
> (= ?x C3))
> (= ?x C4))
> {noformat}
> so the walk is as deep as the list is long. A transformation rewrite is 3
> stack frames per level. The result is a huge number of stack frames until is
> exceeds the stack space available.
> (A right-deep list would be better only if all processing code is aware of
> this and does a loop for the right recursion.)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)