gortiz commented on issue #11039:
URL: https://github.com/apache/pinot/issues/11039#issuecomment-2011771245

   I was studying the situation. In Calcite explain can be decorated with:
   - `AS <TEXT, XML, JSON, DOT>` to change the format used to print the result
   - `WITH IMPLEMENTATION`, `WITHOUT IMPLEMENTATION`, `WITH TYPE`  to ask for 
the logical (WITHOUT IMPLEMENTATION) or physical (WITH IMPLEMENTATION) plan. 
I'm not sure about the meaning of `WITH TYPE`
   - `INCLUDING ATTRIBUTES`, `EXCLUDING ATTRIBUTES`. I'm not sure, but I guess 
it changes which attributes are included on each node (rows, time, etc)
   
   In multi-stage we honor `AS` but neither `WITH` or `INCLUDING`. I think 
there are two reasons why we don't follow `WITH` semantic:
   1. Right now it is very difficult to generate a physical plan using Calcite 
objects
   2. `WITH IMPLEMENTATION` is enabled by default in Calcite, so the SqlExplain 
instance we receive when user writes `EXPLAIN PLAN FOR select ...` returns true 
to `withImplementation()`. That means that by default customers would receive 
the physical plan, not the logical like we are doing right now.
   
   I think we should keep this situation for now and work to try to be able to 
have the actual physical plan (including used indexes). Once we have that, we 
can return that by default with `EXPLAIN` and optionally show the logical plan 
when customers ask for that (using `WITHOUT IMPLEMENTATION`)


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

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


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

Reply via email to