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 1EE8A200CC5 for ; Tue, 27 Jun 2017 02:05:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1D898160BF8; Tue, 27 Jun 2017 00:05:09 +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 64670160BDA for ; Tue, 27 Jun 2017 02:05:08 +0200 (CEST) Received: (qmail 27668 invoked by uid 500); 27 Jun 2017 00:05:07 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 27657 invoked by uid 99); 27 Jun 2017 00:05:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jun 2017 00:05:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id DCDD8C1232 for ; Tue, 27 Jun 2017 00:05:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 1GCaJhwsbGS6 for ; Tue, 27 Jun 2017 00:05:05 +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-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 3F9C65FCB0 for ; Tue, 27 Jun 2017 00:05:05 +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 v5R053Ul026610; Tue, 27 Jun 2017 00:05:03 GMT Message-Id: <201706270005.v5R053Ul026610@ip-10-146-233-104.ec2.internal> Date: Tue, 27 Jun 2017 00:05:03 +0000 From: "Tim Armstrong (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Alex Behm , Juan Yu , Michael Ho , Mostafa Mokhtar Reply-To: tarmstrong@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5483=3A_Automatically_disable_codegen_for_small_queries=0A?= X-Gerrit-Change-Id: I273bcee58641f5b97de52c0b2caab043c914b32e X-Gerrit-ChangeURL: X-Gerrit-Commit: 76bcbbb7bf8874644f88ba20faaef461041c902f 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.7 archived-at: Tue, 27 Jun 2017 00:05:09 -0000 Tim Armstrong has posted comments on this change. Change subject: IMPALA-5483: Automatically disable codegen for small queries ...................................................................... Patch Set 6: (2 comments) http://gerrit.cloudera.org:8080/#/c/7153/6/testdata/workloads/functional-planner/queries/PlannerTest/disable-codegen.test File testdata/workloads/functional-planner/queries/PlannerTest/disable-codegen.test: Line 6: Planner Hints: Disable codegen > The term "hint" already has a different meaning as in "straight_join" kind As mentioned in the other comment the codegen hint isn't equivalent to the query option. It seems a bit questionable that with the other query options we can't distinguish between user-set options and planner-set options in the profile (although you can usually infer for single node plan). Disabling codegen does seem like a significant enough planner decision that it should be somewhat visible in the explain plan. It's a bit less of a problem for the single node optimisation since then there's usually a visible change to the plan shape. We can test it like testComputeStatsMtDop() but if there's nothing in the explain plan it's harder to understand what the planner did. "Planner Hint" might not be the best term if we do include it. Not sure what would be better. Just a plain string like "Codegen disabled by planner"? http://gerrit.cloudera.org:8080/#/c/7153/3/testdata/workloads/functional-query/queries/QueryTest/codegen.test File testdata/workloads/functional-query/queries/QueryTest/codegen.test: Line 2: ---- QUERY > The hint is applied to all FE->BE expr evaluations, and the single-node opt I think we have coverage that the query produces the expected results when the hint is set, but we don't have any coverage that codegen was actually disabled. The distinction between the hint and the query option exists for a reason - there are some exprs that can only be evaluated with codegen enabled. In those cases the hint is overridden. But if the query option is set explicitly, then the option takes precedence and the query fails because the exprs can't be evaluated. b7eeb8bf85ef24b730c9ba2891f5a8075ba9605e added some coverage of that interaction - it runs test_udfs with exec_single_node_rows_threshold set to a couple of different values, which exercises that case. -- To view, visit http://gerrit.cloudera.org:8080/7153 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I273bcee58641f5b97de52c0b2caab043c914b32e Gerrit-PatchSet: 6 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Tim Armstrong Gerrit-Reviewer: Alex Behm Gerrit-Reviewer: Juan Yu Gerrit-Reviewer: Michael Ho Gerrit-Reviewer: Michael Ho Gerrit-Reviewer: Mostafa Mokhtar Gerrit-Reviewer: Tim Armstrong Gerrit-HasComments: Yes