Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1F1A5200CF6 for ; Mon, 18 Sep 2017 21:33:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1D62F1609D4; Mon, 18 Sep 2017 19:33:12 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 62FDC1609DE for ; Mon, 18 Sep 2017 21:33:11 +0200 (CEST) Received: (qmail 27327 invoked by uid 500); 18 Sep 2017 19:33:10 -0000 Mailing-List: contact commits-help@quickstep.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@quickstep.incubator.apache.org Delivered-To: mailing list commits@quickstep.incubator.apache.org Received: (qmail 27318 invoked by uid 99); 18 Sep 2017 19:33:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Sep 2017 19:33:10 +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 258B118311F for ; Mon, 18 Sep 2017 19:33:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.222 X-Spam-Level: X-Spam-Status: No, score=-4.222 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id AiZsnbqXiinW for ; Mon, 18 Sep 2017 19:33:08 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 62F556102F for ; Mon, 18 Sep 2017 19:33:07 +0000 (UTC) Received: (qmail 27106 invoked by uid 99); 18 Sep 2017 19:33:06 -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; Mon, 18 Sep 2017 19:33:06 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B6ED7F5754; Mon, 18 Sep 2017 19:33:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jianqiao@apache.org To: commits@quickstep.incubator.apache.org Date: Mon, 18 Sep 2017 19:33:10 -0000 Message-Id: <9acddac11ca54f05a130f451e2f2a155@git.apache.org> In-Reply-To: <8400ebaa850a4ef289da72169edc5cd1@git.apache.org> References: <8400ebaa850a4ef289da72169edc5cd1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [6/6] incubator-quickstep git commit: Temporary adjustment for shortest path that prefer partitioned aggregation archived-at: Mon, 18 Sep 2017 19:33:12 -0000 Temporary adjustment for shortest path that prefer partitioned aggregation Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/e6c99562 Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/e6c99562 Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/e6c99562 Branch: refs/heads/trace Commit: e6c99562bfd6b64adf15569acb9cd1d7874c79e4 Parents: 01dc532 Author: jianqiao Authored: Mon Sep 18 14:27:28 2017 -0500 Committer: jianqiao Committed: Mon Sep 18 14:32:45 2017 -0500 ---------------------------------------------------------------------- query_optimizer/ExecutionGenerator.cpp | 6 +----- query_optimizer/cost_model/StarSchemaSimpleCostModel.cpp | 2 +- types/containers/ColumnVectorsValueAccessor.hpp | 3 +-- 3 files changed, 3 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/e6c99562/query_optimizer/ExecutionGenerator.cpp ---------------------------------------------------------------------- diff --git a/query_optimizer/ExecutionGenerator.cpp b/query_optimizer/ExecutionGenerator.cpp index e7ef82a..6f362b8 100644 --- a/query_optimizer/ExecutionGenerator.cpp +++ b/query_optimizer/ExecutionGenerator.cpp @@ -189,7 +189,7 @@ static const volatile bool num_aggregation_partitions_dummy = gflags::RegisterFlagValidator(&FLAGS_num_aggregation_partitions, &ValidateNumAggregationPartitions); DEFINE_uint64(partition_aggregation_num_groups_threshold, - 100000, + 100, "The threshold used for deciding whether the aggregation is done " "in a partitioned way or not"); @@ -267,10 +267,6 @@ bool CheckAggregatePartitioned(const std::size_t num_aggregate_functions, const std::vector &is_distincts, const std::vector &group_by_attrs, const std::size_t estimated_num_groups) { - // If there's no aggregation, return false. - if (num_aggregate_functions == 0) { - return false; - } // If there is only only aggregate function, we allow distinct aggregation. // Otherwise it can't be partitioned with distinct aggregation. if (num_aggregate_functions > 1) { http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/e6c99562/query_optimizer/cost_model/StarSchemaSimpleCostModel.cpp ---------------------------------------------------------------------- diff --git a/query_optimizer/cost_model/StarSchemaSimpleCostModel.cpp b/query_optimizer/cost_model/StarSchemaSimpleCostModel.cpp index e0e3dff..ebc4d78 100644 --- a/query_optimizer/cost_model/StarSchemaSimpleCostModel.cpp +++ b/query_optimizer/cost_model/StarSchemaSimpleCostModel.cpp @@ -711,7 +711,7 @@ bool StarSchemaSimpleCostModel::canUseTwoPhaseCompactKeyAggregation( // to put that flag so that it can be shared by the two cpp files (optimizer // vs backend). So here we hardcode the threshold and leave it to be solved // later. - if (estimated_num_groups >= 10000u) { + if (estimated_num_groups >= 100u) { return false; } http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/e6c99562/types/containers/ColumnVectorsValueAccessor.hpp ---------------------------------------------------------------------- diff --git a/types/containers/ColumnVectorsValueAccessor.hpp b/types/containers/ColumnVectorsValueAccessor.hpp index ebd46d4..08b1feb 100644 --- a/types/containers/ColumnVectorsValueAccessor.hpp +++ b/types/containers/ColumnVectorsValueAccessor.hpp @@ -164,8 +164,7 @@ class ColumnVectorsValueAccessor : public ValueAccessor { DCHECK(tupleIdInRange(tid)); if (column_native_[attr_id]) { return static_cast(*columns_[attr_id]) - .getTypedValue(tid) - .makeReferenceToThis(); + .getTypedValue(tid); } else { return static_cast(*columns_[attr_id]) .getTypedValue(tid)