dh-cloud opened a new issue, #53895: URL: https://github.com/apache/doris/issues/53895
### 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 2.1.7 ### What's Wrong? `set disable_join_reorder=true` for `CREATE TABLE AS SELECT` behaves different on master/non-master fe. On master fe, `disable_join_reorder` can successfully disable the join reorder. On non-master fe, `disable_join_reorder` does not work, joins can be reordered. ### What You Expected? No matter master fe or non-master fe, `set disable_join_reorder=true` should successfully disable the join reorder for `CREATE TABLE AS SELECT`. (NOTE: maybe more session variables have the same flaw) ### How to Reproduce? SQLs: ```sql create table t1(id int, dd datetime); insert into t1 select number, now() from numbers(number = 10000000); create table t2(id int, dd datetime); insert into t2 values(1, now()); -- Open __internal_schema.audit_log set global enable_audit_plugin = true; ``` Run on non-master fe:: ```sql set disable_join_reorder = true; set enable_profile=true; create table tt_notmaster as select t2.id,t1.dd from t2 JOIN t1 on t1.id=t2.id; ``` Run on master fe: ```sql set disable_join_reorder = true; set enable_profile=true; create table tt_master as select t2.id,t1.dd from t2 JOIN t1 on t1.id=t2.id; ``` Wait a minute... ```sql select * from __internal_schema.audit_log where stmt like 'create table tt%' ``` We can see different memory usage: ``` peak_memory_bytes: 154994656 stmt: create table tt_master as select t2.id,t1.dd from t2 JOIN t1 on t1.id=t2.id peak_memory_bytes: 2181264 stmt: create table tt_notmaster as select t2.id,t1.dd from t2 JOIN t1 on t1.id=t2.id ``` ### Anything Else? _No response_ ### Are you willing to submit PR? - [ ] 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
