Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B653617D3D for ; Tue, 3 Mar 2015 16:40:11 +0000 (UTC) Received: (qmail 26633 invoked by uid 500); 3 Mar 2015 16:40:05 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 26549 invoked by uid 500); 3 Mar 2015 16:40:05 -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 26445 invoked by uid 99); 3 Mar 2015 16:40:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Mar 2015 16:40:05 +0000 Date: Tue, 3 Mar 2015 16:40:05 +0000 (UTC) From: "Pradeep Bhadani (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-9840) select count(*) should give exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-9840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradeep Bhadani updated HIVE-9840: ---------------------------------- Description: When I am running hive query [count (*)] with any table name or without table name , It spawn MR job and return result as "1" These all command (as below) should fail with Syntax Error hive > select count ( * ) hive > select count ( * ) hive > select count ( * ) hive > select count ( * ) When we provide any table name or do not supllie any argument , it spawn mapreduce job to count the row of table name "_dummy_table". EXPLAIN of above commands : hive> EXPLAIN select count( * ) sample; OK STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 STAGE PLANS: Stage: Stage-1 Map Reduce Map Operator Tree: TableScan alias: _dummy_table Row Limit Per Split: 1 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE Select Operator Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE Group By Operator aggregations: count() mode: hash outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator sort order: Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col0 (type: bigint) Reduce Operator Tree: Group By Operator aggregations: count(VALUE._col0) mode: mergepartial outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: bigint) outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: ListSink Time taken: 0.071 seconds, Fetched: 47 row(s) NOTE: Table "sample" do not exist in my hive. was: When I am running hive query [count (*)] with any table name or without table name , It spawn MR job and return result as "1" These all command (as below) should fail with Syntax Error hive > select count (*) hive > select count (*) hive > select count (*) hive > select count (*) When we provide any table name or do not supllie any argument , it spawn mapreduce job to count the row of table name "_dummy_table". EXPLAIN of above commands : hive> EXPLAIN select count(*) sample; OK STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 STAGE PLANS: Stage: Stage-1 Map Reduce Map Operator Tree: TableScan alias: _dummy_table Row Limit Per Split: 1 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE Select Operator Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE Group By Operator aggregations: count() mode: hash outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator sort order: Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col0 (type: bigint) Reduce Operator Tree: Group By Operator aggregations: count(VALUE._col0) mode: mergepartial outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: bigint) outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: ListSink Time taken: 0.071 seconds, Fetched: 47 row(s) NOTE: Table "sample" do not exist in my hive. > select count(*) should give exception > ------------------------------------------------- > > Key: HIVE-9840 > URL: https://issues.apache.org/jira/browse/HIVE-9840 > Project: Hive > Issue Type: Bug > Components: Hive, Parser, Query Planning, Query Processor > Affects Versions: 0.14.0 > Environment: hive 0.14 > Reporter: Pradeep Bhadani > Priority: Minor > > When I am running hive query [count (*)] with any table name or without table name , It spawn MR job and return result as "1" > These all command (as below) should fail with Syntax Error > hive > select count ( * ) > hive > select count ( * ) > hive > select count ( * ) > hive > select count ( * ) > When we provide any table name or do not supllie any argument , it spawn mapreduce job to count the row of table name "_dummy_table". > EXPLAIN of above commands : > hive> EXPLAIN select count( * ) sample; > OK > STAGE DEPENDENCIES: > Stage-1 is a root stage > Stage-0 depends on stages: Stage-1 > STAGE PLANS: > Stage: Stage-1 > Map Reduce > Map Operator Tree: > TableScan > alias: _dummy_table > Row Limit Per Split: 1 > Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE > Select Operator > Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE > Group By Operator > aggregations: count() > mode: hash > outputColumnNames: _col0 > Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE > Reduce Output Operator > sort order: > Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE > value expressions: _col0 (type: bigint) > Reduce Operator Tree: > Group By Operator > aggregations: count(VALUE._col0) > mode: mergepartial > outputColumnNames: _col0 > Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE > Select Operator > expressions: _col0 (type: bigint) > outputColumnNames: _col0 > Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE > File Output Operator > compressed: false > Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE > table: > input format: org.apache.hadoop.mapred.TextInputFormat > output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat > serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe > Stage: Stage-0 > Fetch Operator > limit: -1 > Processor Tree: > ListSink > Time taken: 0.071 seconds, Fetched: 47 row(s) > NOTE: Table "sample" do not exist in my hive. -- This message was sent by Atlassian JIRA (v6.3.4#6332)