发布于 3年前

Hive 报错:Error: Error while compiling statement: FAILED: ParseException line 1:7 Failed to recognize

执行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 两边加上反引号,问题解决~

©2020 edoou.com   京ICP备16001874号-3