Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 94AAB969E for ; Thu, 29 Sep 2011 21:47:56 +0000 (UTC) Received: (qmail 13245 invoked by uid 500); 29 Sep 2011 21:47:56 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 13217 invoked by uid 500); 29 Sep 2011 21:47:56 -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 13206 invoked by uid 99); 29 Sep 2011 21:47:56 -0000 Received: from reviews.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2011 21:47:56 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 257861C0188; Thu, 29 Sep 2011 21:48:03 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5178785995692194137==" MIME-Version: 1.0 Subject: Review Request: Add StatsTask to task tree for CTAS query. From: "Kevin Wilfong" To: "Ning Zhang" , "Yongqiang He" Date: Thu, 29 Sep 2011 21:48:03 -0000 Message-ID: <20110929214803.13745.77782@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org X-ReviewRequest-URL: https://reviews.apache.org/r/2120/ Cc: "Kevin Wilfong" ,"hive" --===============5178785995692194137== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/2120/ ----------------------------------------------------------- Review request for hive, Yongqiang He and Ning Zhang. Summary ------- (This is not needed for RC-2) I modified StatsTask so that it could be created from a CTAS query. The StatsTask is created where StatsTask are typically created, but instead= of being appended to the final MoveTask it is stored in the QB. This is b= ecause the SemanticAnalyzer appends the task to create the table to the tas= k tree in order to ensure atomicity. The StatsTask requires that the table= already be created, by putting it in the QB, the SemanticAnalyzer is able = to access it and append to it to the create table task. This addresses bug HIVE-2472. https://issues.apache.org/jira/browse/HIVE-2472 Diffs ----- trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java 1177363 = trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMRFileSink1.java= 1177363 = trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/QB.java 1177363 = trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 1= 177363 = trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/StatsWork.java 1177363 = trunk/ql/src/test/results/clientpositive/ctas.q.out 1177363 = trunk/ql/src/test/results/clientpositive/merge3.q.out 1177363 = trunk/ql/src/test/results/clientpositive/rcfile_createas1.q.out 1177363 = trunk/ql/src/test/results/clientpositive/smb_mapjoin9.q.out 1177363 = Diff: https://reviews.apache.org/r/2120/diff Testing ------- I ran a CTAS query and verified the stats appeared in the console at the en= d of the query, and that they were stored in the table's metadata. I ran the unit test queries, and updated the output of the ones which use C= TAS queries Thanks, Kevin --===============5178785995692194137==--