美文网首页
Hive 报错:Error: Error while compi

Hive 报错:Error: Error while compi

作者: 程序媛三妹 | 来源:发表于2019-12-08 18:32 被阅读0次

执行hive SQL 语句“ select out from XXX ” 时报错如下:

Error: Error while compiling statement: FAILED: ParseException line 1:7 Failed to recognize predicate 'out'. Failed rule: 'identifier' in table or column identifier (state=42000,code=40000)

我的本意是取出我表里的out字段的值,该句bug在是指 out 是保留字,虽然我的表里的一列也叫 out,但不能直接执行 select out 字段,修改为如下语句:

select  `out`  from XXX

即在 out 两边加上反引号,问题解决~

————————————————

版权声明:本文为CSDN博主「程序媛三妹」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/u011675334/article/details/100772205

相关文章

网友评论

      本文标题:Hive 报错:Error: Error while compi

      本文链接:https://www.haomeiwen.com/subject/ynpxuctx.html