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 ABA66200CD7 for ; Mon, 26 Jun 2017 22:23:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AA8A1160BDE; Mon, 26 Jun 2017 20:23:05 +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 08955160BF8 for ; Mon, 26 Jun 2017 22:23:04 +0200 (CEST) Received: (qmail 65830 invoked by uid 500); 26 Jun 2017 20:23:04 -0000 Mailing-List: contact issues-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 issues@hive.apache.org Received: (qmail 65792 invoked by uid 99); 26 Jun 2017 20:23:04 -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; Mon, 26 Jun 2017 20:23:04 +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 A872AC061B for ; Mon, 26 Jun 2017 20:23:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id BRhxDTaq-ZZZ for ; Mon, 26 Jun 2017 20:23:02 +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 96D5F5FD53 for ; Mon, 26 Jun 2017 20:23:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 38362E0DEC for ; Mon, 26 Jun 2017 20:23:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 81B1724165 for ; Mon, 26 Jun 2017 20:23:00 +0000 (UTC) Date: Mon, 26 Jun 2017 20:23:00 +0000 (UTC) From: "Gunther Hagleitner (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-16938) INFORMATION_SCHEMA usability: difficult to access # of table records MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 26 Jun 2017 20:23:05 -0000 [ https://issues.apache.org/jira/browse/HIVE-16938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gunther Hagleitner updated HIVE-16938: -------------------------------------- Resolution: Fixed Fix Version/s: 3.0.0 Status: Resolved (was: Patch Available) Committed to master. > INFORMATION_SCHEMA usability: difficult to access # of table records > -------------------------------------------------------------------- > > Key: HIVE-16938 > URL: https://issues.apache.org/jira/browse/HIVE-16938 > Project: Hive > Issue Type: Bug > Reporter: Carter Shanklin > Assignee: Gunther Hagleitner > Fix For: 3.0.0 > > Attachments: HIVE-16938.1.patch, HIVE-16938.2.patch > > > HIVE-1010 adds an information schema to Hive, also taking the opportunity to expose some non-standard but valuable things like statistics in a SYS table. > One common thing users want to know is the number of rows in tables, system wide. > This information is in the table_params table but the structure of this table makes it quite inconvenient to access since it is essentially a table of key-value pairs. More table stats are likely to be added over time, especially because of ACID. It would be a lot better if this were a first class table. > For what it's worth I deal with the current table by pivoting it into something easier to deal with as follows: > {code} > create view table_stats as > select > tbl_id, > max(case param_key when 'COLUMN_STATS_ACCURATE' then param_value end) as COLUMN_STATS_ACCURATE, > max(case param_key when 'numFiles' then param_value end) as numFiles, > max(case param_key when 'numRows' then param_value end) as numRows, > max(case param_key when 'rawDataSize' then param_value end) as rawDataSize, > max(case param_key when 'totalSize' then param_value end) as totalSize, > max(case param_key when 'transient_lastDdlTime' then param_value end) as transient_lastDdlTime > from table_params group by tbl_id; > {code} > It would be better to not have users provide workarounds and make table stats first-class like column stats currently are. -- This message was sent by Atlassian JIRA (v6.4.14#64029)