如下sql,JSON_OBJECT函数中存在CAST函数,随后报出ParseException问题!
SELECT JSON_ARRAYAGG(obj) FROM (SELECT trt.relevance_id,JSON_OBJECT('id',CAST(trt.id AS CHAR),'taskName',trt.task_name,'openStatus',trt.open_status,'taskSort',trt.task_sort) as obj FROM tb_review_task trt ORDER BY trt.task_sort ASC)
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "SELECT"
at line 18, column 10.
Was expecting one of:
"!"
"("
"NOT"
1