jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rve...@apache.org
Subject svn commit: r1562536 - in /jena/trunk/jena-arq/src: main/java/com/hp/hpl/jena/sparql/engine/http/Service.java main/java/com/hp/hpl/jena/sparql/graph/NodeTransformOp.java test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestVarRename.java
Date Wed, 29 Jan 2014 18:20:52 GMT
Author: rvesse
Date: Wed Jan 29 18:20:51 2014
New Revision: 1562536

URL: http://svn.apache.org/r1562536
Log:
Some basic analysis of what needs to be done to fix JENA-494 added as comments

Modified:
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Service.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/NodeTransformOp.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestVarRename.java

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Service.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Service.java?rev=1562536&r1=1562535&r2=1562536&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Service.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Service.java Wed
Jan 29 18:20:51 2014
@@ -102,7 +102,15 @@ public class Service
         // in the first place.
         // Any substitution is also safe because it replaced variables by values. 
         Op opRemote = Rename.reverseVarRename(op.getSubOp(), true) ;
-
+        
+        // JENA-494 There is a bug here that the renaming means that if this is deeply nested

+        // and joined to other things at the same level of you end up with the variables
being
+        // disjoint and the same results
+        // Fixing this requires somehow tracking the renamings that get undone and then wrapping
+        // the resulting query iterator with something to remap it
+        // Likely this means extending UnrenameAnyVars to track the unrenames it does and
this
+        // approach may fall over if there are multiple levels of renaming going on
+        
         //Explain.explain("HTTP", opRemote, context) ;
         
         Query query ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/NodeTransformOp.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/NodeTransformOp.java?rev=1562536&r1=1562535&r2=1562536&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/NodeTransformOp.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/NodeTransformOp.java Wed
Jan 29 18:20:51 2014
@@ -215,5 +215,5 @@ class NodeTransformOp extends TransformC
         }
         
         return new OpGroup(subOp, groupVars, aggregators) ;
-    }
+    }    
 }

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestVarRename.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestVarRename.java?rev=1562536&r1=1562535&r2=1562536&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestVarRename.java
(original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestVarRename.java
Wed Jan 29 18:20:51 2014
@@ -79,6 +79,12 @@ public class TestVarRename extends BaseT
                                            "(project (?s) (project (?s) (table (vars ?/obj)
(row [?/obj 123])) ))",
                                            true,
                                            "s") ; }
+    
+    // JENA-494 : sub-query and service interaction
+    @Test public void rename_14() { rename("(project (?z) (project (?z) (sequence (service
<http://foo> (bgp (?c ?p ?z)) ) (bgp (?c ?q ?z)) ) ) )",
+                                           "(project (?z) (project (?z) (sequence (service
<http://foo> (bgp (?/c ?/p ?z)) ) (bgp (?/c ?/q ?z)) ) ) )",
+                                           true,
+                                           "z") ; }
 
     
     @Test public void rename_reverse_01() { reverse("(project (?s ?/p) (bgp (?s ?/p ?/o)))",



Mime
View raw message