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 11:28:11 UTC

[GitHub] [jena] afs commented on pull request #1620: Allow toggling extended path flattening on

afs commented on PR #1620:
URL: https://github.com/apache/jena/pull/1620#issuecomment-1318495640

   @rvesse - could you add this one-line fix to the PR please: I just ran across the exception being raised when it shouldn't.
   The optimize doesn't do anything in the case of `{2,}` but that's another issue.
   First, no exception.
   
   ```
   diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformPathFlatternStd.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformPathFlatternStd.java
   index fe847fba79..8a19be4a50 100644
   --- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformPathFlatternStd.java
   +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformPathFlatternStd.java
   @@ -169,7 +169,7 @@ public class TransformPathFlatternStd extends TransformCopy {
    
            @Override
            public void visit(P_Mod pathMod) {
   -            if ( pathMod.getMin() > pathMod.getMax() )
   +            if ( pathMod.getMax() > 0 && pathMod.getMin() > pathMod.getMax() )
                    throw new ARQException("Bad path: " + pathMod);
    
                Op op = null;
   ```


-- 
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