Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0B44910763 for ; Tue, 15 Apr 2014 02:41:49 +0000 (UTC) Received: (qmail 98537 invoked by uid 500); 15 Apr 2014 02:41:46 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 98172 invoked by uid 500); 15 Apr 2014 02:41:45 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 98164 invoked by uid 99); 15 Apr 2014 02:41:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Apr 2014 02:41:44 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of adeelmahmood@gmail.com designates 74.125.82.174 as permitted sender) Received: from [74.125.82.174] (HELO mail-we0-f174.google.com) (74.125.82.174) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Apr 2014 02:41:39 +0000 Received: by mail-we0-f174.google.com with SMTP id t60so8843591wes.19 for ; Mon, 14 Apr 2014 19:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=B/RxVdAD+wOn7DFXftwSJQXptpqJ9qdoyou7nOg4PwQ=; b=SQoS5Ds6foB/IUhtDVD0BRHbhTr0zxyoIDnntV0MQ1vee4T4ogcSli5E+zhz5Tp90Y EANfZJQ1g3ZfNGpwHVKcT6XoJRIEaopWaC+hjrWs7rv8MFuDNrqoPRzClAvJhCEs+9p3 GfRWFX+S6X+Nc6bv7oj1/dSzVaU49oaaNUZUZHsLZ1LM2PBvQbpPLASlEUKwhPclbX3+ Ybtpsz7oHjpW2geJYdk8HC0KFKkwXqYbNC4+en6jf13BigFbdHq0AZ2UGBz1LH6DpCU+ jWJZ9CUF6sTrpCBux5OSCCoaXM2nvWmm2rlChQav2Xz5vPgyhwAh+67axSsw/8ofRsiZ dHEw== MIME-Version: 1.0 X-Received: by 10.180.81.138 with SMTP id a10mr12153368wiy.53.1397529676781; Mon, 14 Apr 2014 19:41:16 -0700 (PDT) Received: by 10.180.93.230 with HTTP; Mon, 14 Apr 2014 19:41:16 -0700 (PDT) Date: Mon, 14 Apr 2014 22:41:16 -0400 Message-ID: Subject: Reading query columns in ExecuteWithHookContext From: Adeel Qureshi To: user@hive.apache.org Content-Type: multipart/alternative; boundary=f46d044401baf2ac1904f70bbb68 X-Virus-Checked: Checked by ClamAV on apache.org --f46d044401baf2ac1904f70bbb68 Content-Type: text/plain; charset=UTF-8 I am trying to read the columns from hive queries being executed by implementing the ExecuteWithHookContext hook. This works fine by extracting ColumnAccessInfo information from HiveContext (which is passed in) .getQueryPlan().getColumnAccessInfo(). This provides access to a TableToColumnAccessMap which has all the columns from the query in it along with user information. So this works fine. However when I run same queries on partition tables the list of columns returned by TableToColumnAccessMap are not correct. It includes the partition columns but ends up excluding some of the non-partioned columns. So for a 5 column table with last 2 being partitioned columns it would return 1 non-partioned and 2 partioned columns and simply ignore the other two partitioned columns. Any ideas on what that might be the case or any other ways on getting a handle on columns of a query being run. Thanks Adeel --f46d044401baf2ac1904f70bbb68 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I am trying to read the columns from hive queries being ex= ecuted by implementing the=C2=A0ExecuteWithHookContext hook. This works fin= e by extracting ColumnAccessInfo information from HiveContext (which is pas= sed in) .getQueryPlan().getColumnAccessInfo(). This provides access to a=C2= =A0TableToColumnAccessMap which has all the columns from the query in it al= ong with user information. So this works fine.

However when I run same queries on partition tables the list= of columns returned by=C2=A0TableToColumnAccessMap are not correct. It inc= ludes the partition columns but ends up excluding some of the non-partioned= columns. So for a 5 column table with last 2 being partitioned columns it = would return 1 non-partioned and 2 partioned columns and simply ignore the = other two partitioned columns. Any ideas on what that might be the case or = any other ways on getting a handle on columns of a query being run.

Thanks
Adeel
--f46d044401baf2ac1904f70bbb68--