2016-10-11 8 views
0

後述するように、私はハイブでCTASクエリを実行している:host, begin_time, l4_ul_throughput & l4_dw_throughputがISOPテーブルに存在する列であるハイブエラー:一致する方法

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; 

私はこのクエリを実行する上で受けてるのエラーは次のとおりです。

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; 
関連する問題