Hive中的错误:底层错误:org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException:预计会有一个或多个参数 [英] Error in Hive : Underlying error: org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException: One or more arguments are expected

查看:1487
本文介绍了Hive中的错误:底层错误:org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException:预计会有一个或多个参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误是这样的:

>

The error is this one :

    FAILED: SemanticException Failed to breakup Windowing invocations into Groups. At least 1 group must only depend on input columns. Also check for circular dependencies.
Underlying error: org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException: One or more arguments are expected.

我认为错误来自这部分脚本:

I think that the error is coming from this part of script :

SELECT
        mag.co_magasin,
        dem.id_produit                                  as id_produit_orig,
        pnvente.dt_debut_commercial                     as dt_debut_commercial,
        COALESCE(pnvente.id_produit,dem.id_produit)     as id_produit,
        min(
          CASE WHEN dem.co_validation IS NULL THEN 0 ELSE 1 END
        )                                               as flg_demarque_valide,
        sum(CASE WHEN dem.co_validation IS NULL THEN 0 ELSE cast(dem.mt_revient_ope AS INT) END)
                                                        as me_dem_con_prx_cs,
        0                                               as me_dem_inc_prx_cs,
        0                                               as me_dem_prov_stk_cs,
        sum(CASE WHEN dem.co_validation IS NULL THEN 0 ELSE cast(dem.qt_demarque AS INT) END)
                                                        as qt_dem_con,
        0                                               as qt_dem_inc,
        0                                               as qt_dem_prov_stk,
        RANK() OVER (PARTITION BY mag.co_magasin, dem.id_produit ORDER BY pnvente.dt_debut_commercial DESC, COALESCE(pnvente.id_produit,dem.id_produit) DESC) as rang
      from default.calendrier cal
      INNER JOIN default.demarque_mag_jour dem
      ON  CASE WHEN dem.co_societe = 1 THEN 1 ELSE 2 END = '${hiveconf:in_co_societe}'
      AND dem.dt_jour    = cal.dt_jour
      LEFT OUTER JOIN default.produit_norm pn
      ON  pn.co_societe = dem.co_societe
      AND pn.id_produit = dem.id_produit
      LEFT OUTER JOIN default.produit_norm pnvente
      ON  pnvente.co_societe = pn.co_societe
      AND pnvente.co_produit_rfu = pn.co_produit_lip
      AND pnvente.co_type_motif='05'
      INNER JOIN default.kpi_magasin mag
      ON  mag.co_societe = '${hiveconf:in_co_societe}'
      AND mag.id_magasin = dem.id_magasin
      WHERE cal.dt_jour = '${hiveconf:in_dt_jour}'
      AND NOT (dem.co_validation IS NULL AND cal.dt_jour > from_unixtime(unix_timestamp()-3*60*60*24, 'ddmmyyyy'))
      -- JYP 4.4
      AND dem.co_operation_magasin IN ('13','14','32')
      GROUP BY
        mag.co_magasin,
        dem.id_produit,
        pnvente.dt_debut_commercial,
        COALESCE(pnvente.id_produit,dem.id_produit)

但我在网上找不到任何解决方案。

But i can't find any solution on the web.

谢谢为了您的帮助: - )

Thanks for your help :-)

推荐答案

我遇到了同样的错误。 rank()在配置单元中区分大小写,并且错误消息不会提供任何信息。尝试将 RANK()更改为 rank()

I have run into the same error. rank() is case sensitive in hive and the error message give nothing away. Try changing RANK() to rank().

这篇关于Hive中的错误:底层错误:org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException:预计会有一个或多个参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆