Hive:Error while compiling statement: FAILED: ParseException cannot recognize input near '<EOF>' '<

简介: Hive:Error while compiling statement: FAILED: ParseException cannot recognize input near '<EOF>' '<

Hive:Error while compiling statement: FAILED: ParseException cannot recognize input near '<EOF>' '<


一、Hive SQL 报错如下:

Error: Error while compiling statement: FAILED: ParseException line 79:17 cannot recognize input near '<EOF>' '<EOF>' '<EOF>' in subquery source (state=42000,code=40000)

二、查bug及解决:

Hive SQL 跟Oracle SQL 一样,允许嵌套格式:

-- 伪代码
select * 
from
(
    select * 
    from 
    example_tabel
    where 
    ***
    order by ***
) attention

老实说,一开始检查报错所在行数代码,未发现错误。

后单独执行嵌套在内层的代码,也顺利出结果。

之后发现,嵌套的内层的表一定要有别名,也就是示例代码中的表名 “attention” ,不然就会报上面的错误。

以上,问题解决~


相关文章
|
SQL HIVE
DataGrip连接Hive执行DDL操作报错:「FAILED: ParseException line 1:5 cannot recognize input near 'show' 'indexes' 'on' in ddl statement」
DataGrip连接Hive执行DDL操作报错:「FAILED: ParseException line 1:5 cannot recognize input near 'show' 'indexes' 'on' in ddl statement」
433 0
DataGrip连接Hive执行DDL操作报错:「FAILED: ParseException line 1:5 cannot recognize input near 'show' 'indexes' 'on' in ddl statement」
|
1月前
|
SQL 分布式计算 资源调度
[已解决]FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. Unable to
[已解决]FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. Unable to
172 0
|
SQL HIVE Python
Window10 pyhive连接hive报错:Could not start SASL: b‘Error in sasl_client_start (-4) SASL(-4)
Window10 pyhive连接hive报错:Could not start SASL: b‘Error in sasl_client_start (-4) SASL(-4)
517 0
Window10 pyhive连接hive报错:Could not start SASL: b‘Error in sasl_client_start (-4) SASL(-4)
|
SQL 分布式计算 Hadoop
导入hive表Error: Error while compiling statement: FAILED: SemanticException No files matching path file
导入hive表Error: Error while compiling statement: FAILED: SemanticException No files matching path file
|
SQL HIVE
Hive 报错:Error: Error while compiling statement: FAILED: ParseException line 1:7 Failed to recognize
Hive 报错:Error: Error while compiling statement: FAILED: ParseException line 1:7 Failed to recognize
|
SQL HIVE
HIVE Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. Directory hdfs://m
HIVE Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. Directory hdfs://m
235 0
HIVE Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. Directory hdfs://m
|
SQL Java Apache
hive_异常_01_(未解决)FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org.apache.hadoop.hbase.HTableDescriptor.addFamily
一、异常现象 单独的 hadoop、hbase 、hive 都是正常的,但是在 hive 整合hbase 时,在 hive中输入以下建表语句, CREATE TABLE hbase_table_1(key int, value string) STORED BY 'org.
4601 0
|
1月前
|
SQL 数据采集 数据挖掘
大数据行业应用之Hive数据分析航班线路相关的各项指标
大数据行业应用之Hive数据分析航班线路相关的各项指标
133 1
|
1月前
|
SQL 分布式计算 数据库
【大数据技术Spark】Spark SQL操作Dataframe、读写MySQL、Hive数据库实战(附源码)
【大数据技术Spark】Spark SQL操作Dataframe、读写MySQL、Hive数据库实战(附源码)
144 0