Thank you for the suggestion. I used the below code and it helps.

System.out.println(

    RelOptUtil.dumpPlan(“Physical PLAN", planned, SqlExplainFormat.DOT

        SqlExplainLevel.ALL_ATTRIBUTES));


    On Tuesday, 21 January 2025, 11:37:04 AM GMT-5, Gonzalo Ortiz Jaureguizar 
<[email protected]> wrote:  
 
 You can use `EXPLAIN PLAN AS DOT <your query>`. That will print the plan in
DOT format, so you can render it with Graphviz.
In my experience the generated plan is very difficult to read, in fact in
Pinot we are creating our tool to render the plans to have more control,
but maybe in your case, it is good enough.
I have no idea of DOT format, but if you have, maybe you can take a look at
the way Calcite generates this format.
It would be super cool to be able to generate easy-to-read plans natively
by Calcite.

El mar, 21 ene 2025 a las 17:29, Sree harsha R
(<[email protected]>) escribió:

> I have generally found Calcite query plans easy to understand.
> But when the complexity of the plan increases (think 7 table join with
> multiple join conditions), it becomes difficult to understand the
> complexity.
> Is there a good way to visualize the plans?
> I have used Graphviz to see the shapes of plans when they are generated
> internally. But I don't want to enable logging whenever I need to
> understand a complicated plan.
> ---Thank YouHarsha
  

Reply via email to