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 47A4D200C6F for ; Tue, 9 May 2017 17:50:38 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 467C3160BB6; Tue, 9 May 2017 15:50:38 +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 2595E160BB3 for ; Tue, 9 May 2017 17:50:36 +0200 (CEST) Received: (qmail 40423 invoked by uid 500); 9 May 2017 15:50:35 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 40412 invoked by uid 99); 9 May 2017 15:50:35 -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; Tue, 09 May 2017 15:50:35 +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 32B5818060B; Tue, 9 May 2017 15:50:35 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3 X-Spam-Level: *** X-Spam-Status: No, score=3 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id MKkxW8T2Onas; Tue, 9 May 2017 15:50:33 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 32C495F36E; Tue, 9 May 2017 15:50:33 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C9E72E01D8; Tue, 9 May 2017 15:50:32 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id 93A2BC405C6; Tue, 9 May 2017 15:50:32 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============2231600494896150101==" MIME-Version: 1.0 Subject: Re: Review Request 59096: HIVE-16607 ColumnStatsAutoGatherContext regenerates HiveConf.HIVEQUERYID From: Barna Zsombor Klara To: pengcheng xiong , Aihua Xu Cc: Barna Zsombor Klara , Peter Vary , hive Date: Tue, 09 May 2017 15:50:32 -0000 Message-ID: <20170509155032.48655.73362@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Barna Zsombor Klara X-ReviewGroup: hive X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/59096/ X-Sender: Barna Zsombor Klara References: <20170509150530.23035.12240@reviews-vm2.apache.org> In-Reply-To: <20170509150530.23035.12240@reviews-vm2.apache.org> X-ReviewBoard-Diff-For: ql/src/test/results/clientpositive/beeline/materialized_view_create_rewrite.q.out Reply-To: Barna Zsombor Klara X-ReviewRequest-Repository: hive-git archived-at: Tue, 09 May 2017 15:50:38 -0000 --===============2231600494896150101== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/59096/#review174326 ----------------------------------------------------------- Thanks for the patch Peter. LGTM, with some minor comments/questions. ql/src/java/org/apache/hadoop/hive/ql/QueryState.java Line 32 (original), 31 (patched) I'm not 100% against the current solution, but if possible I would rather see the queryId and maybe the queryString as instance variables of the QueryState. Preferably immutable, final ones. Currently we hand out the queryConf so it may end up being modified, which we should probably prevent. ql/src/java/org/apache/hadoop/hive/ql/QueryState.java Lines 157 (patched) Is this side effect intended? It probably should be modified on the queryConf. - Barna Zsombor Klara On May 9, 2017, 3:05 p.m., Peter Vary wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/59096/ > ----------------------------------------------------------- > > (Updated May 9, 2017, 3:05 p.m.) > > > Review request for hive, Aihua Xu and pengcheng xiong. > > > Bugs: HIVE-16607 > https://issues.apache.org/jira/browse/HIVE-16607 > > > Repository: hive-git > > > Description > ------- > > When creating a QueryState object the caller could specify if new QueryID should be created or the exisiting should be used. > Created a QueryStateBuilder to make the QueryState object creation more readable. > New QueryId is only created in two places: > - Driver constructor > - Operation constructor > Otherwise the existing queryId is used > > > Diffs > ----- > > hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatMultiOutputFormat.java 6ff48ee > itests/src/test/resources/testconfiguration.properties 5ab3076 > itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java b897ffa > itests/util/src/main/java/org/apache/hive/beeline/QFile.java 3d9ca99 > itests/util/src/main/java/org/apache/hive/beeline/QFileBeeLineClient.java 7c50e18 > ql/src/java/org/apache/hadoop/hive/ql/Driver.java 29cce9a > ql/src/java/org/apache/hadoop/hive/ql/QueryState.java 6dfaa9f > ql/src/java/org/apache/hadoop/hive/ql/io/rcfile/stats/PartialScanTask.java 77bce97 > ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveMaterializedViewsRegistry.java b121eea > ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java 3b719af > ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java c7266bc > ql/src/test/org/apache/hadoop/hive/ql/parse/TestMacroSemanticAnalyzer.java c734988 > ql/src/test/org/apache/hadoop/hive/ql/parse/TestQBCompact.java 201622e > ql/src/test/org/apache/hadoop/hive/ql/parse/TestQBJoinTreeApplyPredicate.java e607f10 > ql/src/test/org/apache/hadoop/hive/ql/parse/TestQBSubQuery.java 2674835 > ql/src/test/org/apache/hadoop/hive/ql/parse/TestReplicationSemanticAnalyzer.java 80865bd > ql/src/test/org/apache/hadoop/hive/ql/parse/TestSemanticAnalyzerFactory.java 5849950 > ql/src/test/org/apache/hadoop/hive/ql/parse/TestUpdateDeleteSemanticAnalyzer.java a573808 > ql/src/test/org/apache/hadoop/hive/ql/parse/authorization/TestHiveAuthorizationTaskFactory.java 58cb4b4 > ql/src/test/org/apache/hadoop/hive/ql/parse/authorization/TestPrivilegesV1.java 5d01080 > ql/src/test/org/apache/hadoop/hive/ql/parse/authorization/TestPrivilegesV2.java c552ba7 > ql/src/test/results/clientpositive/beeline/materialized_view_create_rewrite.q.out PRE-CREATION > service/src/java/org/apache/hive/service/cli/operation/Operation.java 0b27608 > > > Diff: https://reviews.apache.org/r/59096/diff/1/ > > > Testing > ------- > > Added new BeeLine test - The original code made the test output different from the Cli test output, since the QueryLog was truncated when the queryId was changed. After the change the BeeLine test output is exactly the same as the Cli output. > > > Thanks, > > Peter Vary > > --===============2231600494896150101==--