我想将数据类型从 String
至 TimeStamp
在Hive中,但下面的查询没有帮助。
ALTER TABLE so_wireless_cpu_utilization MODIFY start_time start_time TIMESTAMP;
它抛出以下错误:
Getting log thread is interrupted, since query is done!
Error: Error while compiling statement: FAILED: ParseException line 1:40 cannot recognize input near 'MODIFY' 'start_time' 'start_time' in alter table statement (state=42000,code=40000)
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:40 cannot recognize input near 'MODIFY' 'start_time' 'start_time' in alter table statement
at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:279)
此外,我尝试了以下查询,但也不起作用:
alter table so_wireless_ap_channels CHANGE load_date load_date String;
那么什么是转换 string
格式化为 timestamp
在 hive
.
暂无答案!
目前还没有任何答案,快来回答吧!