abhioncbr opened a new issue, #11039:
URL: https://github.com/apache/pinot/issues/11039

   **Problem**
   Currently, `ExplainPlanPlanVisitor.explain` ([code 
reference](https://github.com/apache/pinot/blob/master/pinot-query-planner/src/main/java/org/apache/pinot/query/planner/ExplainPlanPlanVisitor.java#L63))
 provides the physical plan of the SQL query in a simple text format. One such 
example of the output is as follows.
   ```
    [0]@localhost:3 MAIL_RECEIVE(RANDOM_DISTRIBUTED)
   ├── [1]@localhost:2 MAIL_SEND(RANDOM_DISTRIBUTED)->{[0]@localhost@{3,3}|[0]}
   │   └── [1]@localhost:2 PROJECT
   │      └── [1]@localhost:2 TABLE SCAN (a) null
   └── [1]@localhost:1 MAIL_SEND(RANDOM_DISTRIBUTED)->{[0]@localhost@{3,3}|[0]}
      └── [1]@localhost:1 PROJECT
         └── [1]@localhost:1 TABLE SCAN (a) null
   ```
   
   `EXPLAIN PLAN FOR` SQL query supports various formats(XML, JSON, DOT and 
TEXT), and with the solution approach to the 
[issue](https://github.com/apache/pinot/issues/10901)(support explain on 
physical plan ); the output of the physical plan of the query should follow the 
same format as mentioned in the `Explain` Query.
   
   **Solution Approach**
   - Extend the `ExplainPlanPlanVisitor` class for different output formats and 
generate the physical plan based on the format mentioned in the `Explain` query.
   - `TEXT` will be the default output format, if not mentioned in the 
`Explain` query.
   
   **NOTE**
   example of the `Explain` query with format option
   ```
   EXPLAIN Plan As JSON Select * from airlineStats
   ```


-- 
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]

Reply via email to