jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1439785 - /jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/TransformFilterPlacement.java
Date Tue, 29 Jan 2013 08:33:34 GMT
Author: andy
Date: Tue Jan 29 08:33:34 2013
New Revision: 1439785

URL: http://svn.apache.org/viewvc?rev=1439785&view=rev
Log:
Need to take a copy of the expressiosn list because it is internally mutated.

Modified:
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/TransformFilterPlacement.java

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/TransformFilterPlacement.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/TransformFilterPlacement.java?rev=1439785&r1=1439784&r2=1439785&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/TransformFilterPlacement.java
(original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/TransformFilterPlacement.java
Tue Jan 29 08:33:34 2013
@@ -56,10 +56,11 @@ public class TransformFilterPlacement ex
     {
         if ( ! doFilterPlacement )
             return OpFilter.filter(exprs, new OpBGP(bgp)) ;
-        
-        Op op = transformFilterBGP(exprs, new HashSet<Var>(), bgp) ;
+        // Mutated
+        ExprList exprs2 = new ExprList(exprs) ;
+        Op op = transformFilterBGP(exprs2, new HashSet<Var>(), bgp) ;
         // Remaining filters? e.g. ones mentioning var s not used anywhere. 
-        op = buildFilter(exprs, op) ;
+        op = buildFilter(exprs2, op) ;
         return op ;
     }
     
@@ -67,11 +68,12 @@ public class TransformFilterPlacement ex
     {
         if ( ! doFilterPlacement )
             return OpFilter.filter(exprs, new OpQuadPattern(graphNode, bgp)) ;
-        Op op =  transformFilterQuadPattern(exprs, new HashSet<Var>(), graphNode, bgp);
-        op = buildFilter(exprs, op) ;
+        // Mutated
+        ExprList exprs2 = new ExprList(exprs) ;
+        Op op =  transformFilterQuadPattern(exprs2, new HashSet<Var>(), graphNode,
bgp);
+        op = buildFilter(exprs2, op) ;
         return op ;
     }
-    
 
     public TransformFilterPlacement()
     { }
@@ -127,6 +129,7 @@ public class TransformFilterPlacement ex
         return  transformFilterBGP(exprs, patternVarsScope, x.getPattern()) ;
     }
 
+    // Mutates exprs
     private static Op transformFilterBGP(ExprList exprs, Set<Var> patternVarsScope,
BasicPattern pattern)
     {
         // Any filters that depend on no variables. 



Mime
View raw message