配置单元错误:没有匹配方法

dpiehjr4  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(285)

我正在配置单元中执行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 & 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` 在table上。
我不知道出了什么问题。有人能提出一个解决方案吗?
xoshrz7s

xoshrz7s1#

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

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;

相关问题