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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to