Hive错误:没有匹配的方法

时间:2016-10-11 08:01:34

标签: hadoop hive udf

我在hive中执行CTAS查询,如下所述:

create table ps_agg
as select host, count(*) c, sum(l4_ul_throughput+l4_dw_throughput) usg from ops.isop
where
cast(cast(from_unixtime(begin_time) as TIMESTAMP) AS DATE) >= '2016-08-01' & 
cast(cast(from_unixtime(begin_time) as TIMESTAMP) AS DATE) < '2016-09-01'
group by host;

host, begin_time, l4_ul_throughput&amp; l4_dw_throughput是ISOP表中的列。

我在运行此查询时收到的错误是:

Wrong arguments 'begin_time' : No matching method for class org.apache.hadoop.hive.ql.udf.UDFOPBitAnd with (string, timestamp).

begin_time是表格中的int类型。

我不知道出了什么问题。有人可以建议解决吗?

1 个答案:

答案 0 :(得分:0)

解决了这个问题;这是一个语法错误。

更正了语法:

create table ps_agg
as select host, count(*) c, sum(l4_ul_throughput+l4_dw_throughput) usg from ops.isop
where
cast(cast(from_unixtime(begin_time) as TIMESTAMP) AS DATE) >= '2016-08-01' AND
cast(cast(from_unixtime(begin_time) as TIMESTAMP) AS DATE) < '2016-09-01'
group by host;
相关问题