vxquery-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prest...@apache.org
Subject svn commit: r1550002 - /incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java
Date Tue, 10 Dec 2013 23:23:06 GMT
Author: prestonc
Date: Tue Dec 10 23:23:06 2013
New Revision: 1550002

URL: http://svn.apache.org/r1550002
Log:
Use the new rules to merge child statements in unnest and data scan operators.

Modified:
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java

Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java?rev=1550002&r1=1550001&r2=1550002&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java
(original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java
Tue Dec 10 23:23:06 2013
@@ -20,6 +20,7 @@ import java.util.LinkedList;
 import java.util.List;
 
 import org.apache.vxquery.compiler.rewriter.rules.ConsolidateAssignAggregateRule;
+import org.apache.vxquery.compiler.rewriter.rules.ConsolidateDataScanUnnestRule;
 import org.apache.vxquery.compiler.rewriter.rules.ConsolidateUnnestsRule;
 import org.apache.vxquery.compiler.rewriter.rules.ConvertAssignToAggregateRule;
 import org.apache.vxquery.compiler.rewriter.rules.ConvertAssignToUnnestRule;
@@ -28,7 +29,8 @@ import org.apache.vxquery.compiler.rewri
 import org.apache.vxquery.compiler.rewriter.rules.IntroduceCollectionRule;
 import org.apache.vxquery.compiler.rewriter.rules.IntroduceTwoStepAggregateRule;
 import org.apache.vxquery.compiler.rewriter.rules.PushMapOperatorDownThroughProductRule;
-import org.apache.vxquery.compiler.rewriter.rules.RemoveRedudantTreatExpressionsRule;
+import org.apache.vxquery.compiler.rewriter.rules.RemoveRedundantPromoteExpressionsRule;
+import org.apache.vxquery.compiler.rewriter.rules.RemoveRedundantTreatExpressionsRule;
 import org.apache.vxquery.compiler.rewriter.rules.RemoveUnusedSortDistinctNodesRule;
 import org.apache.vxquery.compiler.rewriter.rules.RemoveUnusedTreatRule;
 import org.apache.vxquery.compiler.rewriter.rules.SetCollectionDataSourceRule;
@@ -97,19 +99,24 @@ public class RewriteRuleset {
         normalization.add(new EliminateUnnestAggregateSequencesRule());
 
         normalization.add(new ConvertAssignToUnnestRule());
-        normalization.add(new ConsolidateUnnestsRule());
 
         // Used to clean up any missing noops after all the subplans have been altered.
         normalization.add(new RemoveRedundantVariablesRule());
         normalization.add(new RemoveUnusedAssignAndAggregateRule());
 
-        normalization.add(new RemoveRedudantTreatExpressionsRule());
-        
+
         // Convert to a data source scan operator.
         normalization.add(new SetCollectionDataSourceRule());
         normalization.add(new IntroduceCollectionRule());
         normalization.add(new RemoveUnusedAssignAndAggregateRule());
 
+        normalization.add(new ConsolidateUnnestsRule());
+        
+        normalization.add(new RemoveRedundantTreatExpressionsRule());
+        normalization.add(new RemoveRedundantPromoteExpressionsRule());
+
+        normalization.add(new ConsolidateDataScanUnnestRule());
+
         return normalization;
     }
 
@@ -194,7 +201,7 @@ public class RewriteRuleset {
         project.add(new IntroduceProjectsRule());
         return project;
     }
-    
+
     public final static List<IAlgebraicRewriteRule> buildDataExchangeRuleCollection()
{
         List<IAlgebraicRewriteRule> dataExchange = new LinkedList<IAlgebraicRewriteRule>();
         dataExchange.add(new SetExecutionModeRule());



Mime
View raw message