sql 解析异常

Viewed 25

doris:4.0.1版本,存算分离

运行SQL1


select * from __internal_schema.audit_log  limit 1
union all
select * from __internal_schema.audit_log  limit 1

报错:
Execution failed: Error Failed to execute sql: java.sql.SQLException: (conn=17) errCode = 2, detailMessage = no viable alternative at input 'limit'(line 1, pos 43)

运行SQL2


select * from __internal_schema.audit_log order by time desc   limit 1
union all
select * from __internal_schema.audit_log order by time desc   limit 1

报错:
Execution failed: Error Failed to execute sql: java.sql.SQLException: (conn=26) errCode = 2, detailMessage = no viable alternative at input 'order'(line 1, pos 42)

1 Answers