我有以下Impala查询
select session_id, max(cast(milli_ts) as integer), min(cast(milli_ts) as integer)from my_table group by session_id
但是出现了以下错误:
HiveServer2Error: AnalysisException: Syntax error in line 10:
...sion_id, max(cast(milli_ts) as integer), min(cast(mill...
^
Encountered: )
Expected: AND, AS, BETWEEN, DIV, ILIKE, IN, IREGEXP, IS, LIKE, NOT, OR, REGEXP, RLIKE
CAUSED BY: Exception: Syntax error
知道我错过了什么吗?谢谢!
答案 0 :(得分:1)
CAST的正确语法如下:
cast(milli_ts as integer)