jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [2/3] jena git commit: Classification for OpMinus.
Date Mon, 07 Sep 2015 18:34:02 GMT
Classification for OpMinus.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/2542f936
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/2542f936
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/2542f936

Branch: refs/heads/master
Commit: 2542f9367d528c05d0c54ee68cebb337756f0115
Parents: 710989f
Author: Andy Seaborne <andy@apache.org>
Authored: Mon Sep 7 19:29:46 2015 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Mon Sep 7 19:29:46 2015 +0100

----------------------------------------------------------------------
 .../apache/jena/sparql/engine/main/VarFinder.java    | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/2542f936/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/VarFinder.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/VarFinder.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/VarFinder.java
index a1a73fb..e04de77 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/VarFinder.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/VarFinder.java
@@ -163,6 +163,17 @@ public class VarFinder
         }
 
         @Override
+        public void visit(OpMinus opMinus) {
+            joinAcc(opMinus.getLeft()) ;
+            VarUsageVisitor usage = VarUsageVisitor.apply(opMinus.getRight());
+            // Everything in the right side is really a filter.  
+            filterMentions.addAll(usage.defines) ;
+            filterMentions.addAll(usage.optDefines) ;
+            filterMentions.addAll(usage.filterMentions) ;
+            filterMentions.addAll(usage.assignMentions) ;
+        }
+        
+        @Override
         public void visit(OpConditional opLeftJoin) {
             leftJoin(opLeftJoin.getLeft(), opLeftJoin.getRight(), null);
         }
@@ -201,6 +212,7 @@ public class VarFinder
             optDefines.addAll(leftUsage.optDefines);
             filterMentions.addAll(leftUsage.filterMentions);
             assignMentions.addAll(leftUsage.assignMentions);
+            
             defines.addAll(rightUsage.defines);
             optDefines.addAll(rightUsage.optDefines);
             filterMentions.addAll(rightUsage.filterMentions);
@@ -290,9 +302,6 @@ public class VarFinder
         public void visit(OpDiff opDiff) { no(); }
 
         @Override
-        public void visit(OpMinus opMinus) { no(); }
-
-        @Override
         public void visit(OpDisjunction opDisjunction) { no(); }
 
         @Override


Mime
View raw message