Conversation
When TransformPathFlatten/TransformPathFlattenAlgebra run they expand
some paths of the form :x :p{N,M} ?y into multiple triple patterns
within a BGP e.g. :x :p ?q0 . ?q0 :p ?y etc. This is safe for short
values of M but can result in extremely large expansions if M is a large
value. The large expansion is unlikely to make the query run any faster
and a sufficiently large value can cause the query optimiser to fail with
memory/stack issues. This commit introduces a new static control for
the maximum expansion length capped at 10 and does not apply full
expansion to anything longer than that.
|
I agree with the intent. just checking here but I think you mean Unless there is evidence to the contrary, maybe the limit ( |
Yes sorry, got the terminology confused
Yeah I think that's probably sensible, can adjust the PR accordingly |
afs
left a comment
There was a problem hiding this comment.
Looks good - just needs the limit changing to 5.
When
TransformPathFlattern/TransformPathFlattenAlgebrarun they expand some paths of the form:x :p{N,M} ?yinto multiple triple patterns within a BGP e.g.:x :p ?q0 . ?q0 :p ?yetc. This is safe for short values ofMbut can result in extremely large expansions ifMis a large value. The large expansion is unlikely to make the query run any faster. This commit introduces a new static control for the maximum expansion length capped at10and does not apply full expansion to anything longer than that.By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.
See the Apache Jena "Contributing" guide.