解决: Error while compiling statement: FAILED: ParseException line 23:13 extraneous input '('

2020-05-18 15:52:59 浏览数 (1)

1. hive 执行sql,报错:

代码语言:javascript复制
 Error while compiling statement: FAILED: 
ParseException line 23:13 extraneous input '(' expecting ) near ')' in subquery source

2. sql 如下 :

代码语言:javascript复制
SELECT
	pxx_id,
	pxxx_name,
	xxx,
	creationtime,
	creatorid,
	lastxxxxntime,
	lxxxierid,
	NULL,
	NULL,
    NULL 
FROM
	(
SELECT
	pxx_id,
	pxxx_name,
	xxx,
	creationtime,
	creatorid,
	lastxxxxntime,
	lxxxierid,
	NULL,
	NULL
	NULL Row_number ( ) OVER ( PARTITION BY xxx ORDER BY xxx DESC ) AS num 
FROM
	xxx.bxxxi_xxxts_xxxce 
	) bcp 
WHERE
	bcp.num = 1;

3. 解决:如下图,少一个逗号:

0 人点赞