calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Hyde <jhyde.apa...@gmail.com>
Subject Re: A question about subquery output format
Date Fri, 29 May 2020 08:09:08 GMT
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 <jh3507@gmail.com> 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

Mime
View raw message