You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "walterddr (via GitHub)" <gi...@apache.org> on 2023/06/12 23:18:20 UTC

[GitHub] [pinot] walterddr opened a new issue, #10901: [multistage][feature] support explain on physical plan

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

   currently running
   ```
   EXPLAIN PLAN FOR
   SELECT ...
   ```
   returns a logical plan. but we should also allow return a `ExplainPlanVisitor.explainPlan` API to return a physical plan with all the stage assigned and worker info attached. 


-- 
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-unsubscribe@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] abhioncbr commented on issue #10901: [multistage][feature] support explain on physical plan

Posted by "abhioncbr (via GitHub)" <gi...@apache.org>.
abhioncbr commented on issue #10901:
URL: https://github.com/apache/pinot/issues/10901#issuecomment-1589752350

   Please assign this to me. Thanks


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang closed issue #10901: [multistage][feature] support explain on physical plan

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang closed issue #10901: [multistage][feature] support explain on physical plan
URL: https://github.com/apache/pinot/issues/10901


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] abhioncbr commented on issue #10901: [multistage][feature] support explain on physical plan

Posted by "abhioncbr (via GitHub)" <gi...@apache.org>.
abhioncbr commented on issue #10901:
URL: https://github.com/apache/pinot/issues/10901#issuecomment-1606539234

   Hi @walterddr, I will start work on this and follow the pointers you mentioned above.
   - Going to add support for `EXPLAIN PHYSICAL PLAN FOR`; I think it's better to add `FOR` in the end for consistency with the other one.
   - Implement the second part as suggested by you. 
   
   I will ask specific questions if needed. Thanks


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] walterddr commented on issue #10901: [multistage][feature] support explain on physical plan

Posted by "walterddr (via GitHub)" <gi...@apache.org>.
walterddr commented on issue #10901:
URL: https://github.com/apache/pinot/issues/10901#issuecomment-1608533330

   yeah that's OK. let me know if you have any problems. 
   - i think changing the syntatic plugin part might be a bit different and I am not even sure calcite's parser allows that plugin. (see the example for supporting `SqlInsertFromFile` in pinot-common/src/main/codegen/includes/parserImpls.ftl) 
   - with that parsing mechanism done you should be able to generate a valid parser that turns into a SqlExplain node. and from there it should be relatively simple.
   
   


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] walterddr commented on issue #10901: [multistage][feature] support explain on physical plan

Posted by "walterddr (via GitHub)" <gi...@apache.org>.
walterddr commented on issue #10901:
URL: https://github.com/apache/pinot/issues/10901#issuecomment-1589763083

   thank you @abhioncbr please share what you had in mind before implementing it. 
   
   there's 2 part in this.
   1. syntax to explain physical plan. we might be able to do something with `EXPLAIN PLAN FOR` will behave the same for now and `EXPLAIN PHYSICAL PLAN` will return the physical plan
   2. actually invoking and returning the plan (this most likely can be done via `ExplainPlanPlanVisitor.explain` API) 


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] walterddr commented on issue #10901: [multistage][feature] support explain on physical plan

Posted by "walterddr (via GitHub)" <gi...@apache.org>.
walterddr commented on issue #10901:
URL: https://github.com/apache/pinot/issues/10901#issuecomment-1621993504

   with implementation sounds good to me if this is something calcite already supports that's even better IMO


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] abhioncbr commented on issue #10901: [multistage][feature] support explain on physical plan

Posted by "abhioncbr (via GitHub)" <gi...@apache.org>.
abhioncbr commented on issue #10901:
URL: https://github.com/apache/pinot/issues/10901#issuecomment-1650248625

   We can close this issue.


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] abhioncbr commented on issue #10901: [multistage][feature] support explain on physical plan

Posted by "abhioncbr (via GitHub)" <gi...@apache.org>.
abhioncbr commented on issue #10901:
URL: https://github.com/apache/pinot/issues/10901#issuecomment-1620887886

   @walterddr, qq
   I was going through the [SqlExplain code](https://github.com/apache/calcite/blob/main/core/src/main/java/org/apache/calcite/sql/SqlExplain.java), and it looks like we have the option to get Physical plan of the query by using the option `WITH IMPLEMENTATION` in `Explain Plan for` SQL statement itself.
   
   One such example is like below
   ```
   EXPLAIN Plan WITH IMPLEMENTATION for SELECT MIN(AirTime), MAX(AirlineID), SUM(ArrDelay), AVG(ArrDelayMinutes), Year, Quarter 
   FROM airlineStats
   WHERE Year = 2014
   GROUP BY Year, Quarter 
   ORDER BY Year, Quarter DESC
   ```
   
   From the implementation perspective, we have to add the [code here](https://github.com/apache/pinot/blob/master/pinot-query-planner/src/main/java/org/apache/pinot/query/QueryEnvironment.java#L196) in-case if we get the flag true from [SqlExplain's](https://github.com/apache/calcite/blob/main/core/src/main/java/org/apache/calcite/sql/SqlExplain.java#L145) `withImplementation()` method.
   
   Also, if we are going with the implementation of `EXPLAIN PHYSICAL PLAN FOR` itself, do we want to support some options like `EXPLAIN PHYSICAL PLAN AS JSON` or similar?  and, also just confirming from the v1 engine perspective the response would be same for `EXPLAIN PLAN` and `EXPLAIN PHYSICAL PLAN`?


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org