comodohusky opened a new issue, #45527:
URL: https://github.com/apache/doris/issues/45527

   ### 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
   
   doris version : 2.1.6
   
   ### What's Wrong?
   
   When using fe http api to get _query_plan, I found that the "distributed by 
random buckets auto" would respond "Select statement must not embed another 
statement". 
   
   Table Structure
   ```mysql
   create table `test6`
   (
       `id`    int null,
       `time`  date null,
       `name`  varchar(10) null,
       `count` int sum null
   ) engine=olap
   aggregate key(`id`, `time`, `name`)
   distributed by random buckets auto
   properties (
   "replication_allocation" = "tag.location.default: 1"
   );
   ```
   
   HTTP Request
   ```http
   POST http://FE_IP:HTTP_PORT/api/test/test6/_query_plan
   {"sql": "select * from test.test6;"}
   ```
   Response Code
   ```json
   {
     "msg": "success",
     "code": 0,
     "data": {
       "exception": "Select statement must not embed another statement",
       "status": 400
     },
     "count": 0
   }
   ```
   
   ### What You Expected?
   
   What is the cause of this problem? How can I avoid it?
   
   ### How to Reproduce?
   
   ```mysql
   create table `test6`
   (
       `id`    int null,
       `time`  date null,
       `name`  varchar(10) null,
       `count` int sum null
   ) engine=olap
   aggregate key(`id`, `time`, `name`)
   distributed by random buckets auto
   properties (
   "replication_allocation" = "tag.location.default: 1"
   );
   ```
   
   ```shell
   curl -X POST -u 'root:' -H 'Content-Type:application/json' 
'http://fe_host:http_port/api/test/test6/_query_plan' -d '{"sql": "select * 
from test.test6;"}'
   ```
   
   ### 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: 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

Reply via email to