分享

Error “[Cloudera][ImpalaODBC](110) Error ... all DISTINCT aggregate functions need to have the same

 hh3755 2015-12-15
Publicado: 25 Jul 2014
Fecha de la última modificación: 25 Aug 2015

Problema

When using count distinct (COUNT D) with a live Impala connection, the following error might occur:
 
[Cloudera][ImpalaODBC] (110) Error while executing a query in Impala: [HY000] : AnalysisException: all DISTINCT aggregate functions need to have the same set of parameters as COUNT(DISTINCT <filed-name>); deviating function: COUNT(DISTINCT <field-name>)

Entorno

  • Tableau Desktop
  • Cloudera Hadoop Hive
  • Cloudera Impala

Solución

Option 1

Remove multiple COUNT D statements.

Option 2:

  • For Impala 1.4 and earlier: Modify your Impala server configuration and use initial SQL in your workbook. For more information, see Query Options for the SET Command page (for CDH 5.0.x) on the Cloudera website. 
Note: Currently, there is no way to set query options directly through the JDBC and ODBC interfaces. For JDBC and ODBC applications, you can execute queries that need specific query options by invoking impala-shell to run a script that starts with SET commands, or by defining query options globally through the impalad startup flag --default_query_options
  • For Impala Impala 2.0 and later:  Use initial SQL in your workbook. For more information, see Query Options for the SET Command page (for Cloudera 5.3.x) on the Cloudera website. 
Note: In Impala 2.0 and later, you can set query options directly through the JDBC and ODBC interfaces by using the SET statement. Formerly, SET was only available as a command within the impala-shell interpreter.

Causa

This issue is caused by a limitation with the Cloudera database. Cloudera is unable to support multiple COUNT D statements in a query. For more information, see the Cloudera Issues web page.
Fue de ayuda este artículo para resolver el problema?    

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多