You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "vishal.rajan (JIRA)" <ji...@apache.org> on 2016/11/14 16:57:58 UTC

[jira] [Updated] (HIVE-15197) count and sum query on empty table, returning empty output

     [ https://issues.apache.org/jira/browse/HIVE-15197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

vishal.rajan updated HIVE-15197:
--------------------------------
    Summary: count and sum query on empty table, returning empty output   (was: count sum query on empty table, returning empty output )

> count and sum query on empty table, returning empty output 
> -----------------------------------------------------------
>
>                 Key: HIVE-15197
>                 URL: https://issues.apache.org/jira/browse/HIVE-15197
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 2.1.0
>            Reporter: vishal.rajan
>
> When the below query is run in hive 1.2.0  it returns  'NULL	NULL	0' on empty table but when the same query is run on hive 2.1.0, nothing is returned on empty table.
> ----------------hive 1.2.0 -------------------------
> hive>  SELECT sum(destination_pincode),sum(length(source_city)),count(*)  from test_stage.geo_zone;
> MapReduce Jobs Launched: 
> Stage-Stage-1: Map: 1   Cumulative CPU: 4.79 sec   HDFS Read: 7354 HDFS Write: 114 SUCCESS
> Total MapReduce CPU Time Spent: 4 seconds 790 msec
> OK
> NULL	 NULL	 0
> Time taken: 38.168 seconds, Fetched: 1 row(s)
> ---------------------hive 2.1.0-------------------------------------
> hive> SELECT sum(destination_pincode),sum(length(source_city)),count(*)  from test_stage.geo_zone
> WARNING: Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
> Total jobs = 1
> Launching Job 1 out of 1
> Number of reduce tasks is set to 0 since there's no reduce operator
> 2016-11-14 19:06:15,421 WARN  [Thread-215] mapreduce.JobResourceUploader (JobResourceUploader.java:uploadFiles(64)) - Hadoop command-line option parsing not performed. Implement the Tool interface and execute your application with ToolRunner to remedy this.
> 2016-11-14 19:06:19,222 INFO  [Thread-215] input.FileInputFormat (FileInputFormat.java:listStatus(283)) - Total input paths to process : 1
> 2016-11-14 19:06:20,000 INFO  [Thread-215] mapreduce.JobSubmitter (JobSubmitter.java:submitJobInternal(198)) - number of splits:0
> Hadoop job information for Stage-1: number of mappers: 0; number of reducers: 0
> 2016-11-14 19:06:39,405 Stage-1 map = 0%,  reduce = 0%
> Stage-Stage-1:  HDFS Read: 0 HDFS Write: 0 SUCCESS
> Total MapReduce CPU Time Spent: 0 msec
> OK
> Time taken: 28.302 seconds



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)