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/07/08 22:22:08 UTC

[GitHub] [pinot] walterddr commented on a diff in pull request #11052: [multistage] support physical plan in Explain queries

walterddr commented on code in PR #11052:
URL: https://github.com/apache/pinot/pull/11052#discussion_r1257380719


##########
pinot-query-planner/src/main/java/org/apache/pinot/query/QueryEnvironment.java:
##########
@@ -185,16 +185,25 @@ public QueryPlannerResult planQuery(String sqlQuery, SqlNodeAndOptions sqlNodeAn
    * @param sqlNodeAndOptions parsed SQL query.
    * @return QueryPlannerResult containing the explained query plan and the relRoot.
    */
-  public QueryPlannerResult explainQuery(String sqlQuery, SqlNodeAndOptions sqlNodeAndOptions) {
+  public QueryPlannerResult explainQuery(String sqlQuery, SqlNodeAndOptions sqlNodeAndOptions, long requestId) {

Review Comment:
   i was wondering if it make more sense to separate the planQuery method into 2 individual utils 
   - planQueryLogical() --> produce `RelRoot` 
       - maybe even better change `compileQuery` to be named planQueryLogical()
   - planQueryDispatchable() --> produce `QueryPlanResult`
   
   and then both the planQuery and explainQuery can leverage the 2 method. it is becoming hard to track the differences between the explain and actual run part and they are largely the same



##########
pinot-query-planner/src/test/java/org/apache/pinot/query/QueryEnvironmentTestBase.java:
##########
@@ -202,4 +205,10 @@ public String toString() {
       }
     }
   }
+
+  // temporary function to strip the Physical plan from the explain query plan.
+  // physical plan is present for the explain queries by default.

Review Comment:
   can you share an example explain results on both approaches? 



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