SWJTU-ZhangLei opened a new issue, #26781: URL: https://github.com/apache/doris/issues/26781
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues. ### Version ca47d75e834a204010ff12082816fc446aa6635d master ### What's Wrong? 1、build a fe cluster with 1 master and 1 observer 2、connet the master fe and set global enable_nereids_planner = false (default is true) 3、connect to observer and execute stmts `create table t1_cte ( id int, id1 int, c1 bigint, c2 string, c3 double, c4 date ) unique key (id, id1) distributed by hash(id, id1) properties( "replication_num"="1", "function_column.sequence_col" = "c4", "enable_unique_key_merge_on_write" = "true" ); create table t2_cte ( id int, c1 bigint, c2 string, c3 double, c4 date ) unique key (id) distributed by hash(id) properties( "replication_num"="1" ); create table t3_cte ( id int ) distributed by hash(id) properties( "replication_num"="1" ); INSERT INTO t1_cte VALUES (1, 10, 1, '1', 1.0, '2000-01-01'), (2, 20, 2, '2', 2.0, '2000-01-02'), (3, 30, 3, '3', 3.0, '2000-01-03'); INSERT INTO t2_cte VALUES (1, 10, '10', 10.0, '2000-01-10'), (2, 20, '20', 20.0, '2000-01-20'), (3, 30, '30', 30.0, '2000-01-30'), (4, 4, '4', 4.0, '2000-01-04'), (5, 5, '5', 5.0, '2000-01-05'); INSERT INTO t3_cte VALUES (1), (4), (5); set enable_nereids_planner=true; set enable_fallback_to_original_planner=false; set enable_nereids_dml=true; with cte as (select * from t3_cte) delete from t1_cte using t2_cte join cte on t2_cte.id = cte.id where t1_cte.id = t2_cte.id;` 4、the stmt will get error : `mysql> with cte as (select * from t3_cte) -> delete from t1_cte -> using t2_cte join cte on t2_cte.id = cte.id -> where t1_cte.id = t2_cte.id; ERROR 1105 (HY000): errCode = 2, detailMessage = Syntax error in line 2: delete from t1_cte ^ Encountered: DELETE Expected: COMMA ` ### What You Expected? mysql> with cte as (select * from t3_cte) -> delete from t1_cte -> using t2_cte join cte on t2_cte.id = cte.id -> where t1_cte.id = t2_cte.id; Query OK, 1 row affected (2.31 sec) {'label':'label_e937565baa42456c_8ed5554ea7fb8902', 'status':'VISIBLE', 'txnId':'32193964512130048'} ### How to Reproduce? _No response_ ### Anything Else? _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org