modify/change命令在用于将字符串类型数据转换为时间戳的配置单元中不起作用

drkbr07n  于 2021-05-27  发布在  Hadoop
关注(0)|答案(0)|浏览(155)

我想将数据类型从 StringTimeStamp 在Hive中,但下面的查询没有帮助。

  1. ALTER TABLE so_wireless_cpu_utilization MODIFY start_time start_time TIMESTAMP;

它抛出以下错误:

  1. Getting log thread is interrupted, since query is done!
  2. 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)
  3. 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
  4. at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:279)

此外,我尝试了以下查询,但也不起作用:

  1. alter table so_wireless_ap_channels CHANGE load_date load_date String;

那么什么是转换 string 格式化为 timestamphive .

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题