jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rve...@apache.org
Subject [24/26] jena git commit: Do assignment inling sooner if enabled (JENA-780)
Date Tue, 07 Jul 2015 09:24:29 GMT
Do assignment inling sooner if enabled (JENA-780)

Performing inlining sooner may give us more flexibility in optimizing
filters


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

Branch: refs/heads/jena2
Commit: 8e052e3209ed3935e2413abadd1957fb75b30993
Parents: 39e4fd5
Author: Rob Vesse <rvesse@apache.org>
Authored: Tue Jul 7 10:18:22 2015 +0100
Committer: Rob Vesse <rvesse@apache.org>
Committed: Tue Jul 7 10:18:22 2015 +0100

----------------------------------------------------------------------
 .../com/hp/hpl/jena/sparql/algebra/optimize/Optimize.java | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/8e052e32/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/Optimize.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/Optimize.java
b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/Optimize.java
index 180bfd4..d36dae8 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/Optimize.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/Optimize.java
@@ -176,6 +176,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 the filter transformations as inlining assignments may
+        // give us more flexibility in optimizing filters
+        if ( context.isTrue(ARQ.optInlineAssignments) )
+            op = TransformEliminateAssignments.eliminate(op, context.isTrue(ARQ.optInlineAssignmentsAggressive));
 
         // Apply some general purpose filter transformations
                 
@@ -236,10 +242,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
         if ( context.isTrueOrUndef(ARQ.optPromoteTableEmpty) )


Mime
View raw message