当前位置:   article > 正文

hive修改列类型报错FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Unabl

failed: execution error, return code 1 from org.apache.hadoop.hive.ql.exec.d

hive在修改列类型会报错,
原因是列中已存储的数据类型与转换的目标数据类型不兼容
错误代码:

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. 
Unable to alter table. The following columns have types incompatible with 
the existing columns in their respective positions :

  • 1
  • 2
  • 3
  • 4

举个例子:
比如现在A列的类型是String,里面存放的内容是字符串,那么它就不可以转换为int类型。
在这里插入图片描述
所以如果现在A列的类型是String,存放的内容是数字,那么它就可以在int类型与String类型之间来回转换。

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/329731
推荐阅读
相关标签
  

闽ICP备14008679号