You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "abhioncbr (via GitHub)" <gi...@apache.org> on 2023/07/05 01:21:04 UTC

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

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