2016-10-11 28 views
0

我在執行一個蜂巢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

我不知道發生了什麼問題。有人可以提出解決方案嗎?

回答

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;