Return-Path: X-Original-To: apmail-calcite-commits-archive@www.apache.org Delivered-To: apmail-calcite-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9653418E23 for ; Wed, 2 Sep 2015 22:16:13 +0000 (UTC) Received: (qmail 53030 invoked by uid 500); 2 Sep 2015 22:16:13 -0000 Delivered-To: apmail-calcite-commits-archive@calcite.apache.org Received: (qmail 53000 invoked by uid 500); 2 Sep 2015 22:16:13 -0000 Mailing-List: contact commits-help@calcite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@calcite.incubator.apache.org Delivered-To: mailing list commits@calcite.incubator.apache.org Received: (qmail 52991 invoked by uid 99); 2 Sep 2015 22:16:13 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2015 22:16:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1411418234B for ; Wed, 2 Sep 2015 22:16:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.774 X-Spam-Level: X-Spam-Status: No, score=0.774 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.006] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 5lISMMG0rJGL for ; Wed, 2 Sep 2015 22:16:00 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 44B1534A2F for ; Wed, 2 Sep 2015 22:15:54 +0000 (UTC) Received: (qmail 50648 invoked by uid 99); 2 Sep 2015 22:15:50 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2015 22:15:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 58D60E00DB; Wed, 2 Sep 2015 22:15:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jhyde@apache.org To: commits@calcite.incubator.apache.org Date: Wed, 02 Sep 2015 22:16:27 -0000 Message-Id: In-Reply-To: <50285b822f8147bda67dc912bce4a59c@git.apache.org> References: <50285b822f8147bda67dc912bce4a59c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [39/50] incubator-calcite git commit: [CALCITE-822] Revert incorrect LogicalAggregate collation inferring logic made in CALCITE-783 (Milinda Pathirage) [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 Authored: Fri Aug 7 08:24:11 2015 -0700 Committer: Julian Hyde 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 groupSets, List aggCalls) { final RelOptCluster cluster = input.getCluster(); - final RelTraitSet traitSet = cluster.traitSetOf(Convention.NONE).replaceIfs( - RelCollationTraitDef.INSTANCE, - new Supplier>() { - public List get() { - List 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"