That seems to be an improvement. If it can be done without major changes to 
RelWriter etc. 

I think you should log a jira, and attach a PR when you have one. 

Julian

> On May 28, 2020, at 3:58 PM, Juhwan Kim <[email protected]> wrote:
> 
> Hello,
> 
> When there is a subquery in a plan, it looks like RelWriter always prints
> the subquery without any indentation. Although this makes subquery
> recognizable in most cases, I think it would become easier to read and look
> better if we write the subquery with two more indentations than its rel,
> and I think this format also corresponds to how we write code in Calcite.
> Any thoughts about this? I added some example below.
> 
> This is the current representation of a plan with subquery:
> 
> LogicalProject("K0"=[$0], ...)
>  LogicalFilter(condition=[IN($4, {
> LogicalProject(C0=[$5])
>  LogicalTableScan(table=[[CATALOG, STRUCT, T]])
> })])
>    LogicalTableScan(table=[[CATALOG, STRUCT, T]])
> 
> After the change, it would look like this:
> 
> LogicalProject("K0"=[$0], ...)
>  LogicalFilter(condition=[IN($4, {
>      LogicalProject(C0=[$5])
>        LogicalTableScan(table=[[CATALOG, STRUCT, T]])
>      })])
>    LogicalTableScan(table=[[CATALOG, STRUCT, T]])
> 
> Best,
> Juhwan

Reply via email to