jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rve...@apache.org
Subject [1/2] jena git commit: Do assignment inlining sooner if enabled (JENA-780)
Date Tue, 07 Jul 2015 09:18:56 GMT
Repository: jena
Updated Branches:
  refs/heads/eliminate-assignments 39e4fd590 -> 8e052e320
  refs/heads/eliminate-assignments-jena3 263d84262 -> d28edb48e


Do assignment inlining sooner if enabled (JENA-780)

Doing assignment inlining sooner may change filter conditions which may
give us more options on how we optimize filters in some cases


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

Branch: refs/heads/eliminate-assignments-jena3
Commit: d28edb48ed03b0f04a1e63b19265d5153d6657d7
Parents: 263d842
Author: Rob Vesse <rvesse@apache.org>
Authored: Tue Jul 7 10:16:00 2015 +0100
Committer: Rob Vesse <rvesse@apache.org>
Committed: Tue Jul 7 10:16:00 2015 +0100

----------------------------------------------------------------------
 .../apache/jena/sparql/algebra/optimize/Optimize.java    | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/d28edb48/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/Optimize.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/Optimize.java
b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/Optimize.java
index 034e233..8c2347a 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/Optimize.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/Optimize.java
@@ -171,6 +171,12 @@ public class Optimize implements Rewrite
 
         if ( context.isTrueOrUndef(ARQ.optFilterExpandOneOf) )
             op = apply("Break up IN and NOT IN", new TransformExpandOneOf(), op) ;
+        
+        // Eliminate/Inline assignments where possible
+        // Do this before we do some of the filter transformation work as inlining assignments

+        // may give us more flexibility in optimizing the resulting filters
+        if ( context.isTrue(ARQ.optInlineAssignments) )
+            op = TransformEliminateAssignments.eliminate(op, context.isTrue(ARQ.optInlineAssignmentsAggressive));
 
         // Apply some general purpose filter transformations
                 
@@ -203,7 +209,7 @@ public class Optimize implements Rewrite
         // Find joins/leftJoin that can be done by index joins (generally preferred as fixed
memory overhead).
         if ( context.isTrueOrUndef(ARQ.optIndexJoinStrategy) )
             op = apply("Index Join strategy", new TransformJoinStrategy(), op) ;
-        
+                
         // Place filters close to where their dependency variables are defined.
         // This prunes the output of that step as early as possible.
         // If done before TransformJoinStrategy, you can get two applications
@@ -231,9 +237,6 @@ public class Optimize implements Rewrite
         if ( context.isTrue(ARQ.optFilterInequality) )
             op = apply("Filter Inequality", new TransformFilterInequality(), op);
         
-        // Eliminate/Inline assignments where possible
-        if ( context.isTrue(ARQ.optInlineAssignments) )
-            op = TransformEliminateAssignments.eliminate(op, context.isTrue(ARQ.optInlineAssignmentsAggressive));
         
         // Promote table empty as late as possible since this will only be produced by other

         // optimizations and never directly from algebra generation


Mime
View raw message