calcite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jh...@apache.org
Subject [39/50] incubator-calcite git commit: [CALCITE-822] Revert incorrect LogicalAggregate collation inferring logic made in CALCITE-783 (Milinda Pathirage)
Date Wed, 02 Sep 2015 22:16:27 GMT
[CALCITE-822] Revert incorrect LogicalAggregate collation inferring logic made in CALCITE-783
(Milinda Pathirage)


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

Branch: refs/heads/branch-release
Commit: ac934f695db39d88beb5a12c792ba7da68cc386e
Parents: 0357573
Author: Milinda Pathirage <milinda.pathirage@gmail.com>
Authored: Fri Aug 7 08:24:11 2015 -0700
Committer: Julian Hyde <jhyde@apache.org>
Committed: Fri Aug 7 18:43:05 2015 -0700

----------------------------------------------------------------------
 .../calcite/rel/logical/LogicalAggregate.java    | 19 +------------------
 .../org/apache/calcite/test/LatticeTest.java     |  2 +-
 2 files changed, 2 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/ac934f69/core/src/main/java/org/apache/calcite/rel/logical/LogicalAggregate.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/rel/logical/LogicalAggregate.java b/core/src/main/java/org/apache/calcite/rel/logical/LogicalAggregate.java
index 650e8a6..d6b9e57 100644
--- a/core/src/main/java/org/apache/calcite/rel/logical/LogicalAggregate.java
+++ b/core/src/main/java/org/apache/calcite/rel/logical/LogicalAggregate.java
@@ -19,8 +19,6 @@ package org.apache.calcite.rel.logical;
 import org.apache.calcite.plan.Convention;
 import org.apache.calcite.plan.RelOptCluster;
 import org.apache.calcite.plan.RelTraitSet;
-import org.apache.calcite.rel.RelCollation;
-import org.apache.calcite.rel.RelCollationTraitDef;
 import org.apache.calcite.rel.RelInput;
 import org.apache.calcite.rel.RelNode;
 import org.apache.calcite.rel.RelShuttle;
@@ -28,9 +26,6 @@ import org.apache.calcite.rel.core.Aggregate;
 import org.apache.calcite.rel.core.AggregateCall;
 import org.apache.calcite.util.ImmutableBitSet;
 
-import com.google.common.base.Supplier;
-import com.google.common.collect.ImmutableList;
-
 import java.util.List;
 
 /**
@@ -96,19 +91,7 @@ public final class LogicalAggregate extends Aggregate {
       List<ImmutableBitSet> groupSets,
       List<AggregateCall> aggCalls) {
     final RelOptCluster cluster = input.getCluster();
-    final RelTraitSet traitSet = cluster.traitSetOf(Convention.NONE).replaceIfs(
-        RelCollationTraitDef.INSTANCE,
-        new Supplier<List<RelCollation>>() {
-          public List<RelCollation> get() {
-            List<RelCollation> collations =
-                input.getTraitSet().getTraits(RelCollationTraitDef.INSTANCE);
-            if (collations != null) {
-              return collations;
-            }
-
-            return ImmutableList.of();
-          }
-        });
+    final RelTraitSet traitSet = cluster.traitSetOf(Convention.NONE);
     return new LogicalAggregate(cluster, traitSet, input, indicator, groupSet,
         groupSets, aggCalls);
   }

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/ac934f69/core/src/test/java/org/apache/calcite/test/LatticeTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/test/LatticeTest.java b/core/src/test/java/org/apache/calcite/test/LatticeTest.java
index b1155f0..77e7943 100644
--- a/core/src/test/java/org/apache/calcite/test/LatticeTest.java
+++ b/core/src/test/java/org/apache/calcite/test/LatticeTest.java
@@ -436,7 +436,7 @@ public class LatticeTest {
                 + "GROUP BY \"s\".\"unit_sales\", \"p\".\"recyclable_package\", \"t\".\"the_day\",
\"t\".\"the_year\", \"t\".\"quarter\", \"pc\".\"product_family\"")
         .explainContains(
             "JdbcToEnumerableConverter\n"
-                + "  JdbcAggregate(group=[{7, 16, 25, 27, 31, 37}], m0=[COUNT()], m1=[$SUM0($5)],
m2=[$SUM0($7)])\n"
+                + "  JdbcAggregate(group=[{7, 16, 25, 27, 31, 37}], m0=[COUNT()], m1=[SUM($5)],
m2=[SUM($7)])\n"
                 + "    JdbcJoin(condition=[=($8, $33)], joinType=[inner])\n"
                 + "      JdbcJoin(condition=[=($1, $23)], joinType=[inner])\n"
                 + "        JdbcJoin(condition=[=($0, $9)], joinType=[inner])\n"


Mime
View raw message