You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by GitBox <gi...@apache.org> on 2022/11/17 10:46:44 UTC

[GitHub] [jena] rvesse commented on a diff in pull request #1620: Allow toggling extended path flattening on

rvesse commented on code in PR #1620:
URL: https://github.com/apache/jena/pull/1620#discussion_r1025030591


##########
jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformPathFlatternStd.java:
##########
@@ -35,8 +35,15 @@
 
 /** The path transformation step exactly as per the SPARQL 1.1 spec.
  *  i.e. joins triples rather creating BGPs.
+ *  <p>
  *  It does not produce very nice execution structures so ARQ uses
- *  a functional equivalent, but different, transformation.
+ *  a functional equivalent, but different, transformation, see {@link TransformPathFlattern}
+ *  </p>
+ *  <p>
+ *  However for users who are using property paths in their queries heavily there may be benefits to using this
+ *  transform over the simpler one.  The {@link org.apache.jena.query.ARQ#optPathFlattenExtended} symbol can be set in
+ *  an ARQ context to enable this transform in preference to the simpler transform.
+ *  </p>

Review Comment:
   Interestingly the `:p{2}` case actually looks to be expanded the wrong way round (at least to my eye) in the current code.  It produces the following:
   
   ```
   (prefix ((: <http://example/>))
     (sequence
       (path ??P0 (pathN* :p) :T1)
       (bgp
         (triple ?x :p ??P1)
         (triple ??P1 :p ??P0)
       )))
   ```
   
   When I'd expect to see the `bgp` first followed by the `path` operator



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org