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 79EB1200B5E for ; Wed, 10 Aug 2016 23:50:53 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7896A160AA4; Wed, 10 Aug 2016 21:50:53 +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 BD4D8160A8F for ; Wed, 10 Aug 2016 23:50:52 +0200 (CEST) Received: (qmail 2730 invoked by uid 500); 10 Aug 2016 21:50:52 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 2718 invoked by uid 99); 10 Aug 2016 21:50:51 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2016 21:50:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3BCF2C007A for ; Wed, 10 Aug 2016 21:50:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.363 X-Spam-Level: X-Spam-Status: No, score=0.363 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Oze9KoYygewv for ; Wed, 10 Aug 2016 21:50:49 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 56E105F296 for ; Wed, 10 Aug 2016 21:50:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id u7ALonMG006481; Wed, 10 Aug 2016 21:50:49 GMT Message-Id: <201608102150.u7ALonMG006481@ip-10-146-233-104.ec2.internal> Date: Wed, 10 Aug 2016 21:50:48 +0000 From: "Alex Behm (Code Review)" To: impala-cr@cloudera.com, dev@impala.incubator.apache.org CC: Marcel Kornacker Reply-To: alex.behm@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-3940=3A_Fix_getting_column_stats_through_views=2E=0A?= X-Gerrit-Change-Id: Ie3b62a5e7e7d0e84850749108c13991647cedce6 X-Gerrit-ChangeURL: X-Gerrit-Commit: 0ddedb23a2cf50a286b3c28646e6d99707beecee In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.2 archived-at: Wed, 10 Aug 2016 21:50:53 -0000 Alex Behm has uploaded a new patch set (#3). Change subject: IMPALA-3940: Fix getting column stats through views. ...................................................................... IMPALA-3940: Fix getting column stats through views. The bug: During join ordering we rely on the column stats of join predicates for estimating the join cardinality. We have code that tries to find the stats of a column through views but there was a bug in identifying slots that belong to base table scans. The bug lead us to incorrectly accept slots of view references which do not have stats. This patch fixes the above issue and adds new test infrastructure for creating test-local views. It adds a TPCH-equivalent database that contains views of the form "select * from tpch_basetbl" for all TPCH tables and add tests the plans of all TPCH queries on the view database. Change-Id: Ie3b62a5e7e7d0e84850749108c13991647cedce6 --- M fe/src/main/java/com/cloudera/impala/analysis/SlotDescriptor.java M fe/src/main/java/com/cloudera/impala/catalog/View.java M fe/src/test/java/com/cloudera/impala/analysis/AnalyzeAuthStmtsTest.java M fe/src/test/java/com/cloudera/impala/analysis/AnalyzeDDLTest.java M fe/src/test/java/com/cloudera/impala/analysis/AnalyzerTest.java M fe/src/test/java/com/cloudera/impala/analysis/ToSqlTest.java A fe/src/test/java/com/cloudera/impala/common/FrontendTestBase.java M fe/src/test/java/com/cloudera/impala/planner/PlannerTest.java M fe/src/test/java/com/cloudera/impala/planner/PlannerTestBase.java M testdata/workloads/functional-planner/queries/PlannerTest/joins.test M testdata/workloads/functional-planner/queries/PlannerTest/tpcds-all.test M testdata/workloads/functional-planner/queries/PlannerTest/tpch-all.test A testdata/workloads/functional-planner/queries/PlannerTest/tpch-views.test 13 files changed, 4,710 insertions(+), 588 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/65/3865/3 -- To view, visit http://gerrit.cloudera.org:8080/3865 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie3b62a5e7e7d0e84850749108c13991647cedce6 Gerrit-PatchSet: 3 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Alex Behm Gerrit-Reviewer: Alex Behm Gerrit-Reviewer: Marcel Kornacker