Hortonworks.com
  • Explore
    • All Tags
    • All Questions
    • All Articles
    • All Ideas
    • All Repos
    • All SKB
    • All Users
    • All Badges
    • Leaderboard
  • Create
    • Ask a question
    • Create Article
    • Post Idea
    • Add Repo
  • Tracks
    • All Tracks
    • Community Help
    • Cloud & Operations
    • CyberSecurity
    • Data Ingestion & Streaming
    • Data Processing
    • Data Science & Advanced Analytics
    • Design & Architecture
    • Governance & Lifecycle
    • Hadoop Core
    • Sandbox & Learning
    • Security
    • Solutions
  • Login
HCC Hortonworks Community Connection
  • Home /
  • Solutions /
  • Home /
  • Solutions /
avatar image

NVL and COUNT functions are returning empty results for empty tables when running Hive query

Pablo Junge created · Feb 09 at 04:30 PM
avatar image
0

SupportKB

Problem Description:
When running a Hive query, NVL and COUNT functions are returning empty results for empty tables.
jdbc:hive2://c1122-node3.squadron-labs.com> select count(*) from test1 where col1 is not null;

INFO  : Session is already open

INFO  : Dag name: select count(*) from test1 where col1...null(Stage-1)

+------+--+

| _c0  |

+------+--+

+------+--+

No rows selected (0.458 seconds)

Cause:
This issue occurs in the following condition by default this property is false:
hive.fetch.task.aggr=true;

Solution:

To resolve this issue, set condition to:

hive.fetch.task.aggr=false;


About:
This article created by Hortonworks Support (Article: 000008049) on 2019-02-08 20:12
OS: Linux
Type: Configuration
Version: 2-6-5
Support ID: 000008049
thub.nodes.view.add-new-comment
solutionhwsupportHive
Add comment
10 |6000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 5 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

avatar image avatar image avatar image avatar image avatar image
avatar image avatar image avatar image avatar image avatar image
avatar image avatar image avatar image avatar image avatar image
avatar image avatar image avatar image avatar image avatar image
avatar image avatar image avatar image avatar image avatar image
avatar image avatar image avatar image avatar image avatar image
avatar image avatar image avatar image avatar image avatar image
avatar image avatar image avatar image avatar image avatar image
avatar image

Related posts

Hive session in Tez remains open even after terminating the Beeline session from command line

Containers are killed without any manual kill request

Error:"java.io.IOException: RSCClient instance stopped" when connecting to Spark through Beeline

Error:"java.lang.ArrayIndexOutOfBoundsException: 70077 in MR" when running Multi-Insert query in MR from Hive CLI

"FAILED: SemanticException 24:9 Schema of both sides of union should match: Column is of type string on first table and type timestamp on second table" when running an Oozie workflow

Error "[Hortonworks][ThriftExtension] (2) Error occured during authentication" when connecting to Hive LLAP through Hortonworks ODBC Driver

ERROR: "Could not create http connection to jdbc:hive2" when connecting to HiveServer 2 using Beeline

"FAILED: SemanticException MetaException(message:MetaException(message:Got exception: ​java.io.IOException Incomplete HDFS URI," when running a Hive query

"Error in acquiring locks: Lock acquisition for LockRequest(component:[LockComponent" when performing drop partition on Hive on Non ACID tables

Ambari displays the "KILL_PROCESS_TREE" alert for Hive MetaStore

This website uses cookies for analytics, personalisation and advertising. To learn more or change your cookie settings, please read our Cookie Policy. By continuing to browse, you agree to our use of cookies.

HCC Guidelines | HCC FAQs | HCC Privacy Policy | Privacy Policy | Terms of Service

© 2011-2019 Hortonworks Inc. All Rights Reserved.

Hadoop, Falcon, Atlas, Sqoop, Flume, Kafka, Pig, Hive, HBase, Accumulo, Storm, Solr, Spark, Ranger, Knox, Ambari, ZooKeeper, Oozie and the Hadoop elephant logo are trademarks of the Apache Software Foundation.

  • Anonymous
  • Login
  • Create
  • Ask a question
  • Create Article
  • Post Idea
  • Add Repo
  • Create SupportKB
  • Tracks
  • Community Help
  • Cloud & Operations
  • CyberSecurity
  • Data Ingestion & Streaming
  • Data Processing
  • Data Science & Advanced Analytics
  • Design & Architecture
  • Governance & Lifecycle
  • Hadoop Core
  • Sandbox & Learning
  • Security
  • Solutions
  • Explore
  • All Tags
  • All Questions
  • All Articles
  • All Ideas
  • All Repos
  • All SKB
  • All Users
  • Leaderboard
  • All Badges